Output Structures
An output structure contains information on a solver's result. All
solvers can return an output structure. To obtain an output structure, invoke the solver
with the output structure in the calling syntax. For example, to get an output structure
from lsqnonlin
, use the syntax
[x,resnorm,residual,exitflag,output] = lsqnonlin(...)
The contents of the output structure are listed in each solver's
reference pages. For example, the output structure returned by lsqnonlin
contains firstorderopt
, iterations
, funcCount
, cgiterations
, stepsize
, algorithm
,
and message
. To access, for example, the message,
enter output.message
.
You can also see the contents of an output structure by double-clicking the output structure in the MATLAB® Workspace pane.