Optimization Options Reference
Optimization Options
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  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  
BarrierParamUpdate  Chooses the algorithm for updating the barrier parameter in the
 fmincon  
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.  
EnableFeasibilityMode  Chooses the algorithm for achieving feasibility in the
 fmincon  
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
sign′(x) = sign(x) except sign′(0) = 1 .
Central finite differences are
FiniteDifferenceStepSize expands to a vector. The default
is sqrt(eps) for forward finite differences, and eps^(1/3)
for central finite differences.

 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  Usersupplied Hessian, specified as a function handle (see Including Hessians).  fmincon , fminunc  optimoptions only. For optimset , use HessFcn 
HessianMultiplyFcn  Usersupplied Hessian multiply function, specified as a function handle. 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, specified as a function handle.
Ignored unless  
LinearSolver  Type of internal linear solver in algorithm. For
For

 
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 , lsqlin , 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. Pass a function handle or a cell array of function handles. See Output Function and Plot Function Syntax or intlinprog Output Function and Plot Function Syntax. 
 
PlotFcn  Plots various measures of progress while the algorithm executes. Select
from predefined plots or write your own. Give the function name as listed, or as a
function handle such as
See Plot Functions or intlinprog Output Function and Plot Function Syntax. 
 optimoptions only. For optimset , use PlotFcns 
RelativeGapTolerance  Real from
 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  
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.  
SubproblemAlgorithm  Determines how the iteration step is calculated.  fmincon , fminunc , fsolve , lsqcurvefit , lsqlin , lsqnonlin  
TypicalX  Array that specifies typical magnitude of array of parameters

 
UseParallel  When 

Hidden Options
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.
Hidden Optimization Toolbox Options
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.
Note

 
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 
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 
Hidden Global Optimization Toolbox Options
For the reasons these options are hidden, see Options that optimoptions Hides (Global Optimization Toolbox).
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 