FUNCTION REFERENCE
optimoptions
Options for unconstrained and constrained optimization solvers.
Options for unconstrained and constrained optimization solvers.
Syntax
options = optimoptions(solver, 'Name', value, ...)Syntax
options = optimoptions(oldoptions, 'Name', value, ...)solver is a name such as 'fminunc' or a handle such as @fminunc. The result
is a structure holding the options that were set; change one later with dot
assignment, for example options.MaxIterations = 50. Names (case does not
matter): Display ('off', 'final', 'notify' or 'iter'; default 'final'),
MaxIterations, MaxFunctionEvaluations, OptimalityTolerance, StepTolerance,
FunctionTolerance, SpecifyObjectiveGradient, FiniteDifferenceType ('forward'
or 'central') and Algorithm. Constrained solvers additionally accept
ConstraintTolerance and SpecifyConstraintGradient; intlinprog also accepts
MaxNodes, IntegerTolerance, RelativeGapTolerance and AbsoluteGapTolerance.
The older optimset names MaxIter, MaxFunEvals,
TolX, TolFun and GradObj are accepted and stored under the new names. The
solvers also accept a structure from optimset. Nonempty fields for unimplemented
options are errors naming the field. Empty fields keep the defaults. Tolerances
must be finite and positive. Evaluation limits include finite-difference calls
and retries and are checked before each callback.
Example
o = optimoptions('fminunc', 'Display', 'off'); o.MaxIterations = 50; o.MaxIterations % 50Differences from MATLAB: the result is a plain structure, not an options
object, and lists only the options that were set.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.