fminimax option iter not working
4 views (last 30 days)
I want to be able to follow the iteration process of fminimax so that I can see if there is improvement or not since my function takes a very long time to calculate. I use the code below but I do not get any update of the iteration process in the command window. How can I follow the iteration process? Am I implementing this wrong or is there another method? I can see that it is iterating in the task manager (with peaks going up and down cyclical in the memory showing that the data required by the function is loaded and discarded) so there is no problem in the implementation of my function (for example eternal loop)
options = optimoptions(@fminimax,'Display','iter',...
x = fminimax(@myLongFunction,x0,,,,,,,,options);
Alan Weiss on 22 Dec 2015
What are the number of elements in x0? If you have more than 49, then your function might never take even the first step because you limit the number of function evaluations to 50, and fminimax needs more than that number to begin its estimation of the local gradient.
If your function evaluations take a long time because you are running a simulation or solving a differential equation, see some suggestions in the documentation.
I think that you had a good idea to plot something. @optimplotfunccount might give you some idea of how many function counts are needed. Basically, I suggest that you get rid of the 'MaxFunEvals' option and try again.
MATLAB mathematical toolbox documentation