Iterative Display
Introduction
The iterative display is a table of statistics describing the calculations in each iteration of a solver. The statistics depend on both the solver and the solver algorithm. The table appears in the MATLAB^{®} Command Window when you run solvers with appropriate options. For more information about iterations, see Iterations and Function Counts.
Obtain the iterative display by using optimoptions
with the
Display
option set to 'iter'
or
'iterdetailed'
. For example:
options = optimoptions(@fminunc,'Display','iter','Algorithm','quasinewton'); [x fval exitflag output] = fminunc(@sin,0,options);
Firstorder Iteration Funccount f(x) Stepsize optimality 0 2 0 1 1 4 0.841471 1 0.54 2 8 1 0.484797 0.000993 3 10 1 1 5.62e05 4 12 1 1 0 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance.
The iterative display is available for all solvers except:
lsqlin
'trustregionreflective'
algorithmlsqnonneg
quadprog
'trustregionreflective'
algorithm
Common Headings
This table lists some common headings of iterative display.
Heading  Information Displayed 

 Current objective function value 
 Firstorder optimality measure (see FirstOrder Optimality Measure) 
 Number of function evaluations; see Iterations and Function Counts 
 Iteration number; see Iterations and Function Counts 
 Size of the current step (size is the Euclidean norm, or
2norm). For the 
FunctionSpecific Headings
The tables in this section describe headings of the iterative display whose meaning is specific to the optimization function you are using.
fgoalattain, fmincon, fminimax, and fseminf
This table describes the headings specific to fgoalattain
, fmincon
, fminimax
, and fseminf
.
fgoalattain, fmincon, fminimax, or fseminf Heading  Information Displayed 

 Value of the attainment factor for 
 Number of conjugate gradient iterations taken in the current iteration (see Preconditioned Conjugate Gradient Method) 
 Gradient of the objective function along the search direction 
 Maximum constraint violation, where satisfied
inequality constraints count as

 Multiplicative factor that scales the search direction (see Equation 29) 
 Maximum violation among all constraints, both internally constructed and userprovided; can be negative when no constraint is binding 
 Objective function value of the nonlinear programming
reformulation of the minimax problem for 
 Hessian update procedures:
For more information, see Updating the Hessian Matrix. QP subproblem procedures:

 Multiplicative factor that scales the search direction (see Equation 29) 
 Current trustregion radius 
fminbnd and fzero
This table describes the headings specific to fminbnd
and fzero
.
fminbnd or fzero Heading  Information Displayed 

 Procedures for
Procedures for

 Current point for the algorithm 
fminsearch
This table describes the headings specific to fminsearch
.
fminsearch Heading  Information Displayed 

 Simplex procedure at the current iteration. Procedures include:
For details, see fminsearch Algorithm. 
fminunc
This table describes the headings specific to fminunc
.
fminunc Heading  Information Displayed 

 Number of conjugate gradient iterations taken in the current iteration (see Preconditioned Conjugate Gradient Method) 
 Multiplicative factor that scales the search direction (see Equation 11) 
The fminunc
'quasinewton'
algorithm can issue a skipped
update
message to the right of the Firstorder
optimality
column. This message means that
fminunc
did not update its Hessian estimate, because
the resulting matrix would not have been positive definite. The message usually
indicates that the objective function is not smooth at the current point.
fsolve
This table describes the headings specific to fsolve
.
fsolve Heading  Information Displayed 

 Current objective function value, the squared Euclidean norm of the objective function vector 
 λ_{k} value defined in LevenbergMarquardt Method 
 Current trustregion radius (change in the norm of the trustregion radius) 
intlinprog
This table describes the headings specific to intlinprog
.
intlinprog Heading  Information Displayed 

 Cumulative number of explored nodes 
 Time in seconds since 
 Number of integer feasible points found 
 Objective function value of the best integer feasible point found. This value is an upper bound for the final objective function value 
 $$\frac{100(ba)}{\leftb\right+1},$$ where
Note Although you specify 
linprog
This table describes the headings specific to linprog
. Each algorithm has its own
iterative display.
linprog Heading  Information Displayed 

 Primal infeasibility, a measure of the constraint violations, which should be zero at a solution. For definitions, see PredictorCorrector
( 
 Dual infeasibility, a measure of the derivative of the Lagrangian, which should be zero at a solution. For the definition of the Lagrangian,
see PredictorCorrector.
For the definition of dual infeasibility, see PredictorCorrector
( 
 Upper bound feasibility. {x} means those x with finite upper bounds. This value is the r_{u} residual in InteriorPointLegacy Linear Programming. 
 Duality gap (see InteriorPointLegacy Linear Programming) between the
primal objective and the dual objective.

 Total relative error, described at the end of Main Algorithm 
 A measure of the Lagrange multipliers times distance from the bounds, which should be zero at a solution. See the r_{c} variable in Stopping Conditions. 
 Time in seconds that 
lsqlin
The lsqlin
'interiorpoint'
iterative display is inherited from the
quadprog
iterative display. The relationship between
these functions is explained in Linear Least Squares: InteriorPoint or ActiveSet. For iterative display details,
see quadprog. The sole difference in the iterative display is
lsqlin
displays a column titled
Resnorm
, instead of the quadprog
title f(x)
.
lsqnonlin and lsqcurvefit
This table describes the headings specific to lsqnonlin
and lsqcurvefit
.
lsqnonlin or lsqcurvefit Heading  Information Displayed 

 λ_{k} value defined in LevenbergMarquardt Method 
 Value of the squared 2norm of the residual at

 Maximum constraint violation, where satisfied
inequality constraints count as 
quadprog
This table describes the headings specific to quadprog
.
quadprog Heading  Information Displayed 

 Primal infeasibility, defined as 
 Dual infeasibility, defined as 
 A measure of the maximum absolute value of the Lagrange multipliers of inactive inequalities, which should be zero at a solution. This quantity is g in Infeasibility Detection. 
 Maximum constraint violation, where satisfied
inequality constraints count as 