Mathematics | ![]() ![]() |
Setting Minimization Options
You can specify control options that set some minimization parameters by calling fminbnd
with the syntax
x = fminbnd(fun,x1,x2,options)
x = fminsearch(fun,x0,options)
options
is a structure used by the optimization functions. Use optimset
to set the values of the options structure.
options = optimset('Display','iter');
fminbnd
and fminsearch
use only the options
parameters shown in the following table. See the optimset
reference page for a complete list of the parameters that are used in the Optimization Toolbox.
The number of function evaluations, the number of iterations, and the algorithm are returned in the structure output
when you provide fminbnd
or fminsearch
with a fourth output argument, as in
[x,fval,exitflag,output] = fminbnd(@humps,0.3,1);
[x,fval,exitflag,output] = fminsearch(@three_var,v);
![]() | Minimizing Functions of Several Variables | Finding Zeros of Functions | ![]() |