The ODE solvers have a parameter in ODESET called OutputFcn.
OutputFcn – Installable output function [ function ]
This output function is called by the solver after each time step. When
a solver is called with no output arguments, OutputFcn defaults to the
function odeplot. Otherwise, OutputFcn defaults to [].
Something like this would be very nice to have for the functions in the Optimization Toolbox. It would provide a way to examine the progress of the optimizer at each step of the process.
Best Answer