Documentation Center 
On this page… 

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. For more information about iterations, see Iterations and Function Counts. The table appears in the MATLAB^{®} Command Window when you run solvers with appropriate options.
Obtain iterative display by using optimoptions to create options 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.62e005 4 12 1 1 0 Local minimum found. Optimization completed because the size of the gradient is less than the default value of the function tolerance.
You can also obtain iterative display by using the Optimization app. Select Display to command window > Level of display > iterative or iterative with detailed message.
Iterative display is available for all solvers except:
linprog mediumscale activeset algorithm
lsqlin
lsqnonneg
quadprog trustregionreflective and activeset algorithms
The following table lists some common headings of iterative display.
Heading  Information Displayed 

f(x)  Current objective function value 
Firstorder optimality  Firstorder optimality measure (see FirstOrder Optimality Measure) 
Funccount or Fcount  Number of function evaluations; see Iterations and Function Counts 
Iteration or Iter  Iteration number; see Iterations and Function Counts 
Norm of step  Size of the current step (size is the Euclidean norm, or 2norm) 
The following sections describe headings of iterative display whose meaning is specific to the optimization function you are using:
The following table describes the headings specific to fgoalattain, fmincon, fminimax, and fseminf.
fgoalattain, fmincon, fminimax, or fseminf Heading  Information Displayed 

Attainment factor  Value of the attainment factor for fgoalattain. 
CGiterations  Number of conjugate gradient iterations taken in the current iteration (see Preconditioned Conjugate Gradient Method). 
Directional derivative  Gradient of the objective function along the search direction. 
Feasibility  Maximum constraint violation, where satisfied inequality constraints count as 0. 
Line search steplength  Multiplicative factor that scales the search direction (see Equation 646). 
Max constraint  Maximum violation among all constraints, both internally constructed and userprovided; can be negative when no constraint is binding. 
Objective value  Objective function value of the nonlinear programming reformulation of the minimax problem for fminimax. 
Procedure  Hessian update procedures:
For more information, see Updating the Hessian Matrix. QP subproblem procedures:

Steplength  Multiplicative factor that scales the search direction (see Equation 646). 
Trustregion radius  Current trustregion radius. 
The following table describes the headings specific to fminbnd and fzero.
fminbnd or fzero Heading  Information Displayed 

Procedure  Procedures for fminbnd:
Procedures for fzero:

x  Current point for the algorithm 
The following table describes the headings specific to fminsearch.
fminsearch Heading  Information Displayed 

min f(x)  Minimum function value in the current simplex. 
Procedure  Simplex procedure at the current iteration. Procedures include:
For details, see fminsearch Algorithm. 
The following table describes the headings specific to fminunc.
fminunc Heading  Information Displayed 

CGiterations  Number of conjugate gradient iterations taken in the current iteration (see Preconditioned Conjugate Gradient Method) 
Stepsize  Multiplicative factor that scales the search direction (see Equation 612) 
The fminunc mediumscale 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.
The following table describes the headings specific to fsolve.
fsolve Heading  Information Displayed 

Directional derivative  Gradient of the function along the search direction 
Lambda  λ_{k} value defined in LevenbergMarquardt Method 
Residual  Residual (sum of squares) of the function 
Trustregion radius  Current trustregion radius (change in the norm of the trustregion radius) 
The following table describes the headings specific to intlinprog.
linprog Heading  Information Displayed 

nodes explored  Cumulative number of explored nodes. 
total time (s)  Time in seconds since intlinprog started. 
num int solution  Number of integer feasible points found. 
integer fval  Objective function value of the best integer feasible point found. This is an upper bound for the final objective function value. 
relative gap (%) 
where

The following table describes the headings specific to linprog.
linprog Heading  Information Displayed 

Dual Infeas A'*y+zwf  Dual infeasibility. 
Duality Gap x'*z+s'*w  Duality gap (see InteriorPoint Linear Programming) between the primal objective and the dual objective. s and w appear only in this equation if there are finite upper bounds. 
Objective f'*x  Current objective value. 
Primal Infeas A*xb  Primal infeasibility. 
Total Rel Error  Total relative error, described at the end of Main Algorithm. 
The following table describes the headings specific to lsqnonlin and lsqcurvefit.
lsqnonlin or lsqcurvefit Heading  Information Displayed 

Directional derivative  Gradient of the function along the search direction 
Lambda  λ_{k} value defined in LevenbergMarquardt Method 
Resnorm  Value of the squared 2norm of the residual at x 
Residual  Residual vector of the function 
The following table describes the headings specific to quadprog.
quadprog Heading  Information Displayed 

Feasibility  Maximum constraint violation, where satisfied inequality constraints count as 0. 
Total relative error  Total relative error is a measure of infeasibility, as defined in Total Relative Error 