The following table describes optimization options. Create options
using the optimoptions
function,
or optimset
for fminbnd
, fminsearch
, fzero
,
or lsqnonneg
.
See the individual function reference pages for information about available option values and defaults.
The default values for the options vary depending on which optimization
function you call with options
as an input argument.
You can determine the default option values for any of the optimization
functions by entering optimoptions(@
or
the equivalent solvername
)optimoptions('
.
For example,solvername
')
optimoptions(@fmincon)
returns a list of the options and the default values for the
default 'interiorpoint'
fmincon
algorithm.
To find the default values for another fmincon
algorithm,
set the Algorithm
option. For example,
opts = optimoptions(@fmincon,'Algorithm','sqp')
optimoptions
"hides" some
options, meaning it does not display their values. Those options do
not appear in this table. Instead, they appear in Hidden Options.
Optimization Options
Option Name  Description  Used by Functions  Restrictions 

AbsoluteGapTolerance  Nonnegative real. intlinprog stops if
the difference between the internally calculated upper (U )
and lower (L ) bounds on the objective function
is less than or equal to AbsoluteGapTolerance :
 intlinprog  optimoptions only 
AbsoluteMaxObjectiveCount  Number of F(x) to minimize the worst case absolute values.  
Algorithm  Chooses the algorithm used by the solver.  fmincon , fminunc , fsolve , linprog , lsqcurvefit , lsqlin , lsqnonlin , quadprog  
BranchRule  Rule for choosing the component for branching:
 intlinprog  optimoptions only 
CheckGradients  Compare usersupplied analytic derivatives (gradients or Jacobian, depending on the selected solver) to finite differencing derivatives. 
 optimoptions only. For optimset , use DerivativeCheck 
ConstraintTolerance  Tolerance on the constraint violation. 
 optimoptions only. For optimset , use TolCon 
CutGeneration  Level of cut generation (see Cut Generation):
 intlinprog  optimoptions only 
CutMaxIterations  Number of passes through all cut generation methods before
entering the branchandbound phase, an integer from 1 through 50 .
Disable cut generation by setting the CutGeneration option
to 'none' .  intlinprog  optimoptions only 
Display  Level of display.
 All. See the individual function reference pages for the values that apply.  
EqualityGoalCount  Specify the number of objectives required for the objective  optimoptions only. For optimset , use GoalsExactAchieve  
FiniteDifferenceStepSize  Scalar or vector step size factor for finite differences. When
you set
where
Scalar 
 optimoptions only. For optimset , use FinDiffRelStep 
FiniteDifferenceType  Finite differences, used to estimate gradients, are either 
 optimoptions only. For optimset , use FinDiffType 
FunctionTolerance  Termination tolerance on the function value. 
 optimoptions only. For optimset , use TolFun 
HessianApproximation  Method of Hessian approximation: Ignored
when  optimoptions only. For optimset , use Hessian  
HessianFcn  Function handle to a usersupplied Hessian (see Including Hessians).  fmincon fminunc  optimoptions only. For optimset , use HessFcn 
HessianMultiplyFcn  Handle to a usersupplied Hessian multiply function. Ignored
when  optimoptions only. For optimset , use HessMult  
Heuristics  Algorithm for searching for feasible points (see Heuristics for Finding Feasible Solutions):
 intlinprog  optimoptions only 
HeuristicsMaxNodes  Strictly positive integer that bounds the number of nodes intlinprog can
explore in its branchandbound search for feasible points. See Heuristics for Finding Feasible Solutions.  intlinprog  optimoptions only 
HonorBounds  The default  fmincon  optimoptions only. For optimset , use AlwaysHonorConstraints 
IntegerPreprocess  Types of integer preprocessing (see MixedInteger Program Preprocessing):
 intlinprog  optimoptions only 
IntegerTolerance  Real from 1e6 through 1e3 ,
where the maximum deviation from integer that a component of the solution x can
have and still be considered an integer. IntegerTolerance is
not a stopping criterion.  intlinprog  optimoptions only 
JacobianMultiplyFcn  Userdefined Jacobian multiply function. Ignored unless  
Use  Use largescale algorithm if possible.  optimset only  
LPMaxIterations  Strictly positive integer, the maximum number of simplex algorithm iterations per node during the branchandbound process.  intlinprog  optimoptions only 
LPOptimalityTolerance  Nonnegative real where reduced costs must exceed LPOptimalityTolerance for
a variable to be taken into the basis.  intlinprog  optimoptions only 
MaxFunctionEvaluations  Maximum number of function evaluations allowed. 
 optimoptions only. For optimset , use MaxFunEvals 
MaxIterations  Maximum number of iterations allowed.  optimoptions only. For optimset , use MaxIter  
MaxFeasiblePoints  Strictly positive integer. intlinprog stops
if it finds MaxFeasiblePoints integer feasible
points.  intlinprog  optimoptions only 
MaxNodes  Strictly positive integer that is the maximum number of nodes the solver explores in its branchandbound process.  
MaxTime  Maximum amount of time in seconds allowed for the algorithm.  
NodeSelection  Choose the node to explore next.
 intlinprog  optimoptions only 
ObjectiveCutOff  Real greater than Inf . The default is Inf .  intlinprog  optimoptions only 
ObjectiveImprovementThreshold  Nonnegative real. intlinprog changes the
current feasible solution only when it locates another with an objective
function value that is at least ObjectiveImprovementThreshold lower: (fold
– fnew)/(1 + fold) > ObjectiveImprovementThreshold.  intlinprog  optimoptions only 
ObjectiveLimit  If the objective function value goes below  fmincon , fminunc , quadprog  
OptimalityTolerance  Termination tolerance on the firstorder optimality. 
 optimoptions only. For optimset , use TolFun 
OutputFcn  Specify one or more userdefined functions that the optimization
function calls at each iteration. See Output Function or 
 
PlotFcn  Plots various measures of progress while the algorithm executes. Select from predefined plots or write your own.
See Plot Functions or 
 optimoptions only. For optimset , use PlotFcns 
RelativeGapTolerance  Real from 0 through 1 . intlinprog stops
if the relative difference between the internally calculated upper
(U ) and lower (L ) bounds on
the objective function is less than or equal to RelativeGapTolerance :
tolerance =  intlinprog  optimoptions only 
RootLPAlgorithm  Algorithm for solving linear programs:
 intlinprog  optimoptions only 
RootLPMaxIterations  Nonnegative integer that is the maximum number of simplex algorithm iterations to solve the initial linear programming problem.  intlinprog  optimoptions only 
ScaleProblem  For  fmincon  
Use  If  optimset only  
SpecifyConstraintGradient  Userdefined gradients for the nonlinear constraints.  optimoptions only. For optimset , use GradConstr  
SpecifyObjectiveGradient  Userdefined gradients or Jacobians for the objective functions. 
 optimoptions only. For optimset , use GradObj or Jacobian 
StepTolerance  Termination tolerance on x.  All functions except  optimoptions only. For optimset , use TolX 
SubproblemAlgorithm  Determines how the iteration step is calculated.  fmincon  
TypicalX  Array that specifies typical magnitude of array of parameters 
 
UseParallel  When 

optimoptions
"hides" some
options, meaning it does not display their values. To learn how to
view these options, and why they are hidden, see View Options.
Function reference pages list these options in italics.
This table lists the hidden Optimization Toolbox™ options.
Options that optimoptions
Hides
Option Name  Description  Used by Functions  Restrictions  

Diagnostics  Display diagnostic information about the function to be minimized or solved.  All but  
DiffMaxChange  Maximum change in variables for finite differencing. 
 
DiffMinChange  Minimum change in variables for finite differencing. 
 
FunValCheck  Check whether objective function and constraints values
are valid.

 
HessPattern  Sparsity pattern of the Hessian for finite differencing.
The size of the matrix is nbyn, where n is the number of elements
in  
HessUpdate  QuasiNewton updating scheme.  
InitBarrierParam  Initial barrier value.  fmincon  
InitDamping  Initial LevenbergMarquardt parameter.  fsolve , lsqcurvefit , lsqnonlin  optimoptions only  
InitialHessMatrix This option will be removed in a future release.  Initial quasiNewton matrix.  optimset only  
InitialHessType This option will be removed in a future release.  Initial quasiNewton matrix type.  optimset only  
InitTrustRegionRadius  Initial radius of the trust region.  fmincon  
JacobPattern  Sparsity pattern of the Jacobian for finite differencing.
The size of the matrix is  
LPPreprocess  Type of preprocessing for the solution to the relaxed linear
program (see Linear Program Preprocessing):
 intlinprog  optimoptions only  
MaxPCGIter  Maximum number of iterations of preconditioned conjugate gradients method allowed. 
 
MaxProjCGIter  A tolerance for the number of projected conjugate gradient iterations; this is an inner iteration, not the number of iterations of the algorithm.  fmincon  
MaxSQPIter  Maximum number of iterations of sequential quadratic programming method allowed.  
MeritFunction  Use goal attainment/minimax merit function (multiobjective)
vs.  
PrecondBandWidth  Upper bandwidth of preconditioner for PCG. Setting to 
 
Preprocess  Level of LP preprocessing prior to simplex or dual simplex algorithm iterations.  optimoptions only  
RelLineSrchBnd  Relative bound on line search step length.  
RelLineSrchBndDuration  Number of iterations for which the bound specified in  
ScaleProblem  When using the  fsolve , lsqcurvefit , lsqnonlin  
TolConSQP  Constraint violation tolerance for the inner SQP iteration.  fgoalattain , fmincon , fminimax , fseminf  
TolPCG  Termination tolerance on the PCG iteration. 
 
TolProjCG  A relative tolerance for projected conjugate gradient algorithm; this is for an inner iteration, not the algorithm iteration.  fmincon  
TolProjCGAbs  Absolute tolerance for projected conjugate gradient algorithm; this is for an inner iteration, not the algorithm iteration.  fmincon 
For the reasons these options are hidden, see Options that optimoptions Hides.
Options that optimoptions
Hides
Option Name  Used by Functions 

Cache 

CacheSize 

CacheTol 

DisplayInterval 

FunValCheck 

HybridInterval 

InitialPenalty 

MaxMeshSize 

MeshRotate 

MigrationDirection 

MigrationFraction 

MigrationInterval 

PenaltyFactor 

PlotInterval 

StallTest 

TolBind  patternsearch 
Many option names changed in R2016a. optimset
uses
only legacy option names. optimoptions
accepts
both legacy and current names. However, when you set an option using
a legacy namevalue pair, optimoptions
displays
the current equivalent value. For example, the legacy TolX
option
is equivalent to the current StepTolerance
option:
options = optimoptions('fsolve','TolX',1e4)
options = fsolve options: Options used by current Algorithm ('trustregiondogleg'): (Other available algorithms: 'levenbergmarquardt', 'trustregionreflective') Set properties: StepTolerance: 1.0000e04 Default properties: Algorithm: 'trustregiondogleg' CheckGradients: 0 Display: 'final' FiniteDifferenceStepSize: 'sqrt(eps)' FiniteDifferenceType: 'forward' FunctionTolerance: 1.0000e06 MaxFunctionEvaluations: '100*numberOfVariables' MaxIterations: 400 OptimalityTolerance: 1.0000e06 OutputFcn: [] PlotFcn: [] SpecifyObjectiveGradient: 0 TypicalX: 'ones(numberOfVariables,1)' UseParallel: 0 Show options not used by current Algorithm ('trustregiondogleg')
These two tables have identical information. One is in alphabetical order by legacy option name, the other is in order by current option name. The tables show values only when the values differ between legacy and current, and show only names that differ or have different values. For changes in Global Optimization Toolbox solvers, see Options Changes in R2016a.
Option Names in Legacy Order
Legacy Name  Current Name  Legacy Values  Current Values 

AlwaysHonorConstraints  HonorBounds  'bounds' , 'none'  true , false 
BranchingRule  BranchRule  
CutGenMaxIter  CutMaxIterations  
DerivativeCheck  CheckGradients  'on' , 'off'  true , false 
FinDiffRelStep  FiniteDifferenceStepSize  
FinDiffType  FiniteDifferenceType  
GoalsExactAchieve  EqualityGoalCount  
GradConstr  SpecifyConstraintGradient  'on' , 'off'  true , false 
GradObj  SpecifyObjectiveGradient  'on' , 'off'  true , false 
Hessian  HessianApproximation  'usersupplied' , 'bfgs' , 'lbfgs' , 'findiffgrads' , 'on' , 'off' 
Ignored
when 
HessFcn  HessianFcn  
HessMult  HessianMultiplyFcn  
IPPreprocess  IntegerPreprocess  
Jacobian  SpecifyObjectiveGradient  
JacobMult  JacobianMultiplyFcn  
LPMaxIter  LPMaxIterations  
MaxFunEvals  MaxFunctionEvaluations  
MaxIter  MaxIterations  
MaxNumFeasPoints  MaxFeasiblePoints  
MinAbsMax  AbsoluteMaxObjectiveCount  
PlotFcns  PlotFcn  
RelObjThreshold  ObjectiveImprovementThreshold  
RootLPMaxIter  RootLPMaxIterations  
ScaleProblem  ScaleProblem  'objandconstr' , 'none'  true , false 
TolCon  ConstraintTolerance  
TolFun (usage 1)  OptimalityTolerance  
TolFun (usage 2)  FunctionTolerance  
TolFunLP  LPOptimalityTolerance  
TolGapAbs  AbsoluteGapTolerance  
TolGapRel  RelativeGapTolerance  
TolInteger  IntegerTolerance  
TolX  StepTolerance 
Option Names in Current Order
Current Name  Legacy Name  Current Values  Legacy Values 

AbsoluteGapTolerance  TolGapAbs  
AbsoluteMaxObjectiveCount  MinAbsMax  
BranchRule  BranchingRule  
CheckGradients  DerivativeCheck  true , false  'on' , 'off' 
ConstraintTolerance  TolCon  
CutMaxIterations  CutGenMaxIter  
EqualityGoalCount  GoalsExactAchieve  
FiniteDifferenceStepSize  FinDiffRelStep  
FiniteDifferenceType  FinDiffType  
FunctionTolerance  TolFun (usage 2)  
HonorBounds  AlwaysHonorConstraints  true , false  'bounds' , 'none' 
HessianApproximation  Hessian 
Ignored
when  'usersupplied' , 'bfgs' , 'lbfgs' , 'findiffgrads' , 'on' , 'off' 
HessianFcn  HessFcn  
HessianMultiplyFcn  HessMult  
IntegerPreprocess  IPPreprocess  
IntegerTolerance  TolInteger  
JacobianMultiplyFcn  JacobMult  
LPMaxIterations  LPMaxIter  
LPOptimalityTolerance  TolFunLP  
MaxFeasiblePoints  MaxNumFeasPoints  
MaxFunctionEvaluations  MaxFunEvals  
MaxIterations  MaxIter  
ObjectiveImprovementThreshold  RelObjThreshold  
OptimalityTolerance  TolFun (usage 1)  
PlotFcn  PlotFcns  
RelativeGapTolerance  TolGapRel  
RootLPMaxIterations  RootLPMaxIter  
ScaleProblem  ScaleProblem  true , false  'objandconstr' , 'none' 
SpecifyConstraintGradient  GradConstr  true , false  'on' , 'off' 
SpecifyObjectiveGradient  GradObj or Jacobian  true , false  'on' , 'off' 
StepTolerance  TolX 