Describes how to make an optimization function call an output function at each iteration.
www.mathworks.com