| Optimization Toolbox™ | ![]() |
options = optimset('param1',value1,'param2',value2,...)
optimset
options = optimset
options = optimset(optimfun)
options = optimset(oldopts,'param1',value1,...)
options = optimset(oldopts,newopts)
options = optimset('param1',value1,'param2',value2,...) creates an optimization options structure called options, in which the specified options (param) have specified values. Any unspecified options are set to [] (options with value [] indicate to use the default value for that option when you pass options to the optimization function). It is sufficient to type only enough leading characters to define the option name uniquely. Case is ignored for option names.
optimset with no input or output arguments displays a complete list of options with their valid values.
options = optimset (with no input arguments) creates an options structure options where all fields are set to [].
options = optimset(optimfun) creates an options structure options with all option names and default values relevant to the optimization function optimfun.
options = optimset(oldopts,'param1',value1,...) creates a copy of oldopts, modifying the specified options with the specified values.
options = optimset(oldopts,newopts) combines an existing options structure, oldopts, with a new options structure, newopts. Any options in newopts with nonempty values overwrite the corresponding old options in oldopts.
For more information about individual options, see the reference pages for the optimization functions that use these options. Optimization Options provides descriptions of these options and which functions use them.
In the following lists, values in { } denote the default value; some options have different defaults for different optimization functions and so no values are shown in { }.
You can also view the optimization options and defaults by typing optimset at the command line.
Optimization options used by both large-scale and medium-scale algorithms:
| Algorithm | 'active-set' | 'interior-point' | {'trust-region-reflective'} |
| DerivativeCheck | 'on' | {'off'} |
| Diagnostics | 'on' | {'off'} |
| Display | 'off' | 'iter' |'final' |'notify' |
| FunValCheck | {'off'} | 'on' |
| GradObj | 'on' | {'off'} |
| Jacobian | 'on' | {'off'} |
| LargeScale | 'on' |'off'. The default for fsolve is 'off'. The default for all other functions that provide a large-scale algorithm is 'on'. |
| MaxFunEvals | Positive integer |
| MaxIter | Positive integer |
| OutputFcn | function_handle | {[]}. Specify one or more (using a cell array of function handles) user-defined functions that an optimization function calls at each iteration. See Output Function. |
| PlotFcns | function_handle | {[]}. Specify one or more (using a cell array of function handles) pre- or user-defined plot functions that an optimization function calls at each iteration. See Plot Functions. |
| TolCon | Positive scalar |
| TolFun | Positive scalar |
| TolX | Positive scalar |
| TypicalX | Vector of all ones |
Optimization options used by large-scale algorithms only:
| Hessian | 'on' | {'off'} |
| HessMult | Function | {[]} |
| HessPattern | Sparse matrix |{sparse matrix of all ones} |
| InitialHessMatrix | {'identity'} | 'scaled-identity' | 'user-supplied' |
| InitialHessType | scalar | vector | {[]} |
| JacobMult | Function | {[]} |
| JacobPattern | Sparse matrix |{sparse matrix of all ones} |
| MaxPCGIter | Positive integer | {the greater of 1 and floor(n/2))} where n is the number of elements in x0, the starting point |
| PrecondBandWidth | Positive integer | 0 | Inf The default value depends on the solver. |
| TolPCG | Positive scalar | {0.1} |
Optimization options used by medium-scale algorithms only:
| BranchStrategy | 'mininfeas' | {'maxinfeas'} |
| DiffMaxChange | Positive scalar | {1e-1} |
| DiffMinChange | Positive scalar | {1e-8} |
| GoalsExactAchieve | Positive scalar integer | {0} |
| GradConstr | 'on' | {'off'} |
| HessUpdate | {'bfgs'} | 'dfp' | 'steepdesc' |
| LevenbergMarquardt | 'on' | {'off'} |
| LineSearchType | 'cubicpoly' | {'quadcubic'} |
| MaxNodes | Positive scalar | {1000*NumberOfVariables} |
| MaxRLPIter | Positive scalar | {100*NumberOfVariables} |
| MaxSQPIter | Positive integer |
| MaxTime | Positive scalar | {7200} |
| MeritFunction | 'singleobj' | {'multiobj'} |
| MinAbsMax | Positive scalar integer | {0} |
| NodeDisplayInterval | Positive scalar | {20} |
| NodeSearchStrategy | 'df' | {'bn'} |
| NonlEqnAlgorithm | {'dogleg'} | 'lm' | 'gn', where 'lm' is Levenburg-Marquardt and 'gn' is Gauss-Newton. |
| RelLineSrchBnd | Real nonnegative scalar | {[]} |
| RelLineSrchBndDuration | Positive integer | {1} |
| Simplex | When you set 'Simplex' to 'on' and 'LargeScale' to 'off', linprog uses the simplex algorithm to solve a constrained linear programming problem. |
| TolConSQP | Positive scalar | {1e-6} |
| TolRLPFun | Positive scalar | {1e-6} |
| TolXInteger | Positive scalar | {1e-8} |
| UseParallel | 'always' | {'never'} |
Optimization options used by interior-point algorithm only:
| AlwaysHonorConstraints | 'bounds' | {'none'} |
| FinDiffType | 'central' | {'forward'} |
| HessFcn | Function handle to a user-supplied Hessian |
| Hessian | 'fin-diff-grads' | 'lbfgs' | {'lbfgs',Positive Integer} | 'user-supplied' | {bfgs} |
| HessMult | Handle to a user-supplied function that gives a Hessian-times-vector product |
| InitBarrierParameter | Positive real scalar | {0.1} |
| InitTrustRegionRadius | Positive real scalar | {
|
| MaxProjCGIter | Positive integer | {2*(n - neq}, where n is the number of variables, and neq is the number of equalities |
| ObjectiveLimit | Scalar | -1e20 |
| ScaleProblem | 'none' | {'obj-and-constr' |
| SubproblemAlgorithm | 'cg' | {'ldl-factorization'} |
| TolProjCG | Positive scalar | {1e-2} |
| TolProjCGAbs | Positive scalar | {1e-10} |
This statement creates an optimization options structure called options in which the Display option is set to 'iter' and the TolFun option is set to 1e-8.
options = optimset('Display','iter','TolFun',1e-8)
This statement makes a copy of the options structure called options, changing the value of the TolX option and storing new values in optnew.
optnew = optimset(options,'TolX',1e-4);
This statement returns an optimization options structure options that contains all the option names and default values relevant to the function fminbnd.
options = optimset('fminbnd')
If you only want to see the default values for fminbnd, you can simply type
optimset fminbnd
or equivalently
optimset('fminbnd')![]() | optimget | optimtool | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |