I am using the lsqnonlin optimization function to minimize an objective function with ~50 variables. I'm also making a movie (using OutputFcn with getFrame) to show what is happening the these variables at each iteration (for presentation purposes).
Currently, the algorithm does ~20 iterations before it stops so my video ends up with 20 frames. 20 frames isn't enough if I want a nice smooth movie that is at least 5 seconds long. I figure I need roughly 120 frames (5 sec. * 24 FPS) to get a nice smooth video. The only way I can think to do this is to force the optimization algorithm to do at least 120 iterations.
What options could I play with to force more iterations from lsqnonlin? DiffMaxChange maybe? Note that I don't want to just have it continue doing iterations after a solution is found. Rather, I want the objective function to change less between iterations.
Any help or insight would be greatly appreciated. I don't know much about how these optimization algorithms work.
Regards, Justin
Best Answer