MATLAB Function Reference    
optimset

Create or edit optimization options parameter structure

Syntax

Description

options = optimset('param1',value1,'param2',value2,...) creates an optimization options structure called options, in which the specified parameters (param) have specified values. Any unspecified parameters are set to [] (parameters with value [] indicate to use the default value for that parameter when options is passed to the optimization function). It is sufficient to type only enough leading characters to define the parameter name uniquely. Case is ignored for parameter names.

optimset with no input or output arguments displays a complete list of parameters 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 parameter names and default values relevant to the optimization function optimfun.

options = optimset(oldopts,'param1',value1,...) creates a copy of oldopts, modifying the specified parameters with the specified values.

options = optimset(oldopts,newopts) combines an existing options structure oldopts with a new options structure newopts. Any parameters in newopts with nonempty values overwrite the corresponding old parameters in oldopts.

Parameters

Optimization parameters used by MATLAB functions and Optimization Toolbox functions:

Parameter
Value
Description
Display
'off' | 'iter' | 'final' | 'notify'
Level of display. 'off' displays no output; 'iter' displays output at each iteration; 'final' displays just the final output; 'notify' dislays output only if the function does not converge.
MaxFunEvals
positive integer
Maximum number of function evaluations allowed.
MaxIter
positive integer
Maximum number of iterations allowed.
TolFun
positive scalar
Termination tolerance on the function value.
TolX
positive scalar
Termination tolerance on .

Optimization parameters used by Optimization Toolbox functions (for more information about individual parameters, see Optimization Options Parameters in the Optimization Toolbox User's Guide, and the optimization functions that use these parameters).

Property
Value
Description
DerivativeCheck
'on' | {'off'}
Compare user-supplied analytic derivatives (gradients or Jacobian) to finite differencing derivatives.
Diagnostics
'on' | {'off'}
Print diagnostic information about the function to be minimized or solved.
DiffMaxChange
positive scalar | {1e-1}
Maximum change in variables for finite difference derivatives.
DiffMinChange
positive scalar | {1e-8}
Minimum change in variables for finite difference derivatives.
GoalsExactAchieve
positive scalar integer | {0}
Number of goals to achieve exactly (do not over- or underachieve).
GradConstr
'on' | {'off'}
Gradients for nonlinear constraints defined by the user.
GradObj
'on' | {'off'}
Gradient(s) for objective function(s) defined by the user.
Hessian
'on' | {'off'}
Hessian for the objective function defined by the user.
HessMult
function | {[]}
Hessian multiply function defined by the user.
HessPattern
sparse matrix |{sparse matrix of all ones}
Sparsity pattern of the Hessian for finite differencing. The size of the matrix is n-by-n, where n is the number of elements in x0, the starting point.
HessUpdate
{'bfgs'} | 'dfp' | 'gillmurray' | 'steepdesc'
Quasi-Newton updating scheme.
Jacobian
'on' | {'off'}
Jacobian for the objective function defined by the user.
JacobMult
function | {[]}
Jacobian multiply function defined by the user.
JacobPattern
sparse matrix |{sparse matrix of all ones}
Sparsity pattern of the Jacobian for finite differencing. The size of the matrix is m-by-n, where m is the number of values in the first argument returned by the user-specified function fun, and n is the number of elements in x0, the starting point.
LargeScale
{'on'} | 'off'
Use large-scale algorithm if possible. Exception: default for fsolve is 'off'.
LevenbergMarquardt
'on' | {'off'}
Chooses Levenberg-Marquardt over Gauss-Newton algorithm.
LineSearchType
'cubicpoly' | {'quadcubic'}
Line search algorithm choice.
MaxPCGIter
positive integer
Maximum number of PCG iterations allowed. The default is the greater of 1 and floor(n/2)) where n is the number of elements in x0, the starting point.
MeritFunction
'singleobj' | {'multiobj'}
Use goal attainment/minimax merit function (multiobjective) vs. fmincon (single objective).
MinAbsMax
positive scalar integer | {0}
Number of to minimize the worst case absolute values
PrecondBandWidth
positive integer | {0}  | Inf
Upper bandwidth of preconditioner for PCG.
TolCon
positive scalar
Termination tolerance on the constraint violation.
TolPCG
positive scalar | {0.1}
Termination tolerance on the PCG iteration.
TypicalX
vector of all ones
Typical x values. The length of the vector is equal to the number of elements in x0, the starting point.

Examples

This statement creates an optimization options structure called options in which the Display parameter is set to 'iter' and the TolFun parameter is set to 1e-8.

This statement makes a copy of the options structure called options, changing the value of the TolX parameter and storing new values in optnew.

This statement returns an optimization options structure that contains all the parameter names and default values relevant to the function fminbnd.

See Also
optimget, fminbnd, fminsearch, fzero, lsqnonneg


  optimget orderfields