Navigation

Operators and Keywords

Function List:

C++ API

: optimset ()
: options = optimset ()
: options = optimset (par, val, …)
: options = optimset (old, par, val, …)
: options = optimset (old, new)

Create options structure for optimization functions.

When called without any input or output arguments, optimset prints a list of all valid optimization parameters.

When called with one output and no inputs, return an options structure with all valid option parameters initialized to [].

When called with a list of parameter/value pairs, return an options structure with only the named parameters initialized.

When the first input is an existing options structure old, the values are updated from either the par/val list or from the options structure new.

Valid parameters are:

AutoScaling
ComplexEqn
Display

Request verbose display of results from optimizations. Values are:

"off" [default]

No display.

"iter"

Display intermediate results for every loop iteration.

"final"

Display the result of the final loop iteration.

"notify"

Display the result of the final loop iteration if the function has failed to converge.

FinDiffType
FunValCheck

When enabled, display an error if the objective function returns an invalid value (a complex number, NaN, or Inf). Must be set to "on" or "off" [default]. Note: the functions fzero and fminbnd correctly handle Inf values and only complex values or NaN will cause an error in this case.

GradObj

When set to "on", the function to be minimized must return a second argument which is the gradient, or first derivative, of the function at the point x. If set to "off" [default], the gradient is computed via finite differences.

Jacobian

When set to "on", the function to be minimized must return a second argument which is the Jacobian, or first derivative, of the function at the point x. If set to "off" [default], the Jacobian is computed via finite differences.

MaxFunEvals

Maximum number of function evaluations before optimization stops. Must be a positive integer.

MaxIter

Maximum number of algorithm iterations before optimization stops. Must be a positive integer.

OutputFcn

A user-defined function executed once per algorithm iteration.

TolFun

Termination criterion for the function output. If the difference in the calculated objective function between one algorithm iteration and the next is less than TolFun the optimization stops. Must be a positive scalar.

TolX

Termination criterion for the function input. If the difference in x, the current search point, between one algorithm iteration and the next is less than TolX the optimization stops. Must be a positive scalar.

TypicalX
Updating

See also: optimget.

Package: octave