| Contents | Index |
| 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 optimset to create an options structure with the Display option set to 'iter' or 'iter-detailed'. For example:
options = optimset('Display','iter','LargeScale','off');
[x fval exitflag output] = fminunc(@sin,0,options);
First-order
Iteration Func-count f(x) Step-size optimality
0 2 0 1
1 4 -0.841471 1 0.54
2 8 -1 0.484797 0.000993
3 10 -1 1 5.62e-005
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 Tool. Select Display to command window > Level of display > iterative or iterative with detailed message.

Iterative display is available for all solvers except:
linprog medium-scale active-set algorithm
lsqlin
lsqnonneg
quadprog
The following table lists some common headings of iterative display.
| Heading | Information Displayed |
|---|---|
Iteration or Iter | Iteration number; see Iterations and Function Counts |
Func-count or F-count | Number of function evaluations; see Iterations and Function Counts |
f(x) | Current objective function value |
First-order optimality | First-order optimality measure (see First-Order Optimality Measure) |
Norm of step | Size of the current step (size is the Euclidean norm, or 2-norm) |
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 bintprog.
| bintprog Heading | Information Displayed |
|---|---|
Explored nodes | Cumulative number of explored nodes. |
Obj of LP relaxation | Objective function value of the linear programming (LP) relaxation problem. |
Obj of best integer point | Objective function value of the best integer point found so far. This is an upper bound for the final objective function value. |
Unexplored nodes | Number of nodes that have been set up but not yet explored. |
Best lower bound on obj | Objective function value of LP relaxation problem that gives the best current lower bound on the final objective function value. |
Relative gap between bounds |
where
|
The following table describes the headings specific to fgoalattain, fmincon, fminimax, and fseminf.
| fgoalattain, fmincon, fminimax, or fseminf Heading | Information Displayed |
|---|---|
Max constraint | Maximum violation among all constraints, both internally constructed and user-provided; can be negative when no constraint is binding. |
CG-iterations | Number of conjugate gradient iterations taken in the current iteration (see Preconditioned Conjugate Gradient Method). |
Trust-region radius | Current trust-region radius. |
Line search steplength | Multiplicative factor that scales the search direction (see Equation 6-46). |
Steplength | Multiplicative factor that scales the search direction (see Equation 6-46). |
Attainment factor | Value of the attainment factor for fgoalattain. |
Objective value | Objective function value of the nonlinear programming reformulation of the minimax problem for fminimax. |
Directional derivative | Gradient of the objective function along the search direction. |
Procedure | Hessian update procedures:
For more information, see Updating the Hessian Matrix. QP subproblem procedures:
|
Feasibility | Maximum constraint violation, where satisfied inequality constraints count as 0. |
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 |
|---|---|
CG-iterations | Number of conjugate gradient iterations taken in the current iteration (see Preconditioned Conjugate Gradient Method) |
Step-size | Multiplicative factor that scales the search direction (see Equation 6-12) |
The fminunc medium-scale algorithm can issue a skipped update message to the right of the First-order 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 |
|---|---|
Trust-region radius | Current trust-region radius (change in the norm of the trust-region radius) |
CG-iterations | Number of conjugate gradient iterations taken in the current iteration (see Preconditioned Conjugate Gradient Method) |
Residual | Residual (sum of squares) of the function |
Directional derivative | Gradient of the function along the search direction |
Lambda | λk value defined in Levenberg-Marquardt Method |
The following table describes the headings specific to linprog.
| linprog Heading | Information Displayed |
|---|---|
Primal Infeas A*x-b | Primal infeasibility. |
Dual Infeas A'*y+z-w-f | Dual infeasibility. |
Duality Gap x'*z+s'*w | Duality gap (see Large Scale Linear Programming) between the primal objective and the dual objective. s and w appear only in this equation if there are finite upper bounds. |
Total Rel Error | Total relative error, described at the end of Main Algorithm. |
Objective f'*x | Current objective value. |
The following table describes the headings specific to lsqnonlin and lsqcurvefit.
| lsqnonlin or lsqcurvefit Heading | Information Displayed |
|---|---|
Resnorm | Value of the squared 2-norm of the residual at x |
Residual | Residual vector of the function |
CG-iterations | Number of conjugate gradient iterations taken in the current iteration (see Preconditioned Conjugate Gradient Method) |
Directional derivative | Gradient of the function along the search direction |
Lambda | λk value defined in Levenberg-Marquardt Method |
![]() | First-Order Optimality Measure | Output Structures | ![]() |

Learn how to use optimization to solve systems of equations, fit models to data, or optimize system performance.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |