| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Optimization Toolbox |
| Contents | Index |
| Learn more about Optimization Toolbox |
| On this page… |
|---|
Note An optimization function does not return all of the output headings, described in the following tables, each time you call it. Which output headings are returned depends on the algorithm the optimization function uses for a particular problem. |
When you set 'Display' to 'iter' or 'iter-detailed' in options, the optimization functions display iterative output in the Command Window. This output, which provides information about the progress of the algorithm, is displayed in columns with descriptive headings. For more information about iterations, see Iterations and Function Counts.
For example, if you run medium-scale fminunc with 'Display' set to 'iter', the output headings are
First-order Iteration Func-count f(x) Step-size optimality
The following table lists some common output headings of iterative output.
| Output 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 |
x | Current point for the algorithm |
f(x) | Current function value |
Step-size | Step size in the current search direction |
Norm of step | Norm of the current step |
The following sections describe output headings of iterative output whose meaning is specific to the optimization function you are using.
The following table describes the output headings specific to bintprog.
| bintprog Output 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 output headings specific to fminsearch.
| fminsearch Output Heading | Information Displayed |
|---|---|
min f(x) | Minimum function value in the current simplex |
Procedure | Simplex procedure at the current iteration. Procedures include initial, expand, reflect, shrink, contract inside, and contract outside. See fminsearch Algorithm for explanations of these procedures. |
The following table describes the output headings specific to fzero and fminbnd.
| fzero and fminbnd Output Heading | Information Displayed |
|---|---|
Procedure | Procedure at the current operation. Procedures for fzero:
Operations for fminbnd:
|
The following table describes the output headings specific to fminunc.
| fminunc Output Heading | Information Displayed |
|---|---|
First-order optimality | First-order optimality measure (see First-Order Optimality Measure) |
CG-iterations | Number of conjugate gradient iterations taken by the current (optimization) iteration (see Preconditioned Conjugate Gradient Method) |
The following table describes the output headings specific to fsolve.
| fsolve Output Heading | Information Displayed |
|---|---|
First-order optimality | First-order optimality measure (see First-Order Optimality Measure) |
Trust-region radius | Current trust-region radius (change in the norm of the trust-region radius) |
Residual | Residual (sum of squares) of the function |
Directional derivative | Gradient of the function along the search direction |
The following table describes the output headings specific to fgoalattain, fmincon, fminimax, and fseminf.
| fgoalattain, fmincon, fminimax, fseminf Output Heading | Information Displayed |
|---|---|
Max constraint | Maximum violation among all constraints, both internally constructed and user-provided |
First-order optimality | First-order optimality measure (see First-Order Optimality Measure) |
CG-iterations | Number of conjugate gradient iterations taken by the current (optimization) iteration (see Preconditioned Conjugate Gradient Method) |
Trust-region radius | Current trust-region radius |
Residual | Residual (sum of squares) of the function |
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 | Current gradient of the function along the search direction |
Procedure | Hessian update and QP subproblem. The Procedure messages are discussed in Updating the Hessian Matrix. |
The following table describes the output headings specific to linprog.
| linprog Output 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 output headings specific to lsqnonlin and lsqcurvefit.
| lsqnonlin and lsqcurvefit Output Heading | Information Displayed |
|---|---|
Resnorm | Value of the squared 2-norm of the residual at x |
Residual | Residual vector of the function |
First-order optimality | First-order optimality measure (see First-Order Optimality Measure) |
CG-iterations | Number of conjugate gradient iterations taken by the current (optimization) iteration (see Preconditioned Conjugate Gradient Method) |
Directional derivative | Gradient of the function along the search direction |
Lambda | λk value defined in Levenberg-Marquardt Method. (This value is displayed when you use the Levenberg-Marquardt method and omitted when you use the Gauss-Newton method.) |
![]() | First-Order Optimality Measure | Output Structures | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |