From: sigma on
Hello Matlab experts here,

I have a general question: When one uses Matlab functions for minimization (eg, fminsearch, fminunc, lsqnonlin, etc.), is there any way to store the information of the path of minimization? (that is, the points visited by the algorithm from the starting positions to the terminating positions)

I searched for the option without finding it.

Thank you all in advance!

Lei
From: Alan Weiss on
sigma wrote:
> Hello Matlab experts here,
>
> I have a general question: When one uses Matlab functions for
> minimization (eg, fminsearch, fminunc, lsqnonlin, etc.), is there any
> way to store the information of the path of minimization? (that is, the
> points visited by the algorithm from the starting positions to the
> terminating positions)
>
> I searched for the option without finding it.
> Thank you all in advance!
>
> Lei
You can use an output function to record the points. For examples, see
http://www.mathworks.com/access/helpdesk/help/techdoc/math/bsgpq6p-23.html#bsgpq6q-31
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-56.html#brjhnjy

Alan Weiss
MATLAB mathematical toolbox documentation