MATLAB: Final report for fminunc

MATLABoptimization

I'm using the optimization function fminunc. I'd like to generate a final report that includes: number of function calls, total time of optimization, (maybe time of each call?) and the path of the optimization variables (the values that they take: starting from the initial point, then for each iteration, until the value that Matlab returns.
How can we do this? The Display option of the optimization toolbox does not show these. I would like to have then stored as a result that I can read and manipulate.

Best Answer

Create an Output Function to record whatever information you like.
Alan Weiss
MATLAB mathematical toolbox documentation