I'm minimizing a non-linear function of 3 variables with fminsearch in Octave. Because, the solution gets close to the minimum, but not close enough, I need to investigate the behavior during the iterations.
I know that Matlab can set optimset('PlotFcns',@optimplotfval) to plot the iterations, but I do not have that luxury in Octave. Is there a way to store the variables in a vector, each time they are passed to my function? My function is defined separately, and its name is passed as a handle to fminsearch.