An output function is a function that an optimization function calls at each iteration ... You can use the OutputFcn option with the following MATLAB® optimization ...
www.mathworks.com