exitflag=0 in fmincon accepted as accurate?

26 views (last 30 days)
I use the interior-point algorithm in fmincon when doing the optimization. The exitflag corresponding to most of my outcome are 1 and 2 but I also got a few 0 as the exitflag. I know I should accept positive exitflag and reject negative exitflag, but how about 0? Can it be accepted as a stable convergence? Or should I tolerate on result which delivers 0?
Many thanks!

Accepted Answer

Alan Weiss
Alan Weiss on 18 Nov 2014
Take a look at what exitflag 0 means:
Number of iterations exceeded options.MaxIter or number of function evaluations exceeded options.MaxFunEvals.
So as far as fmincon is concerned, it did not reach a solution, it just exceeded a limit on the number of iterations or function evaluations. I would not accept this as a solution.
Alan Weiss
MATLAB mathematical toolbox documentation

More Answers (1)

Naresh Nandakumar
Naresh Nandakumar on 26 Jul 2017
Hi! I got a few exitflag = 0's. Does a value get generated and stored when this happens? Even if it isn't the exact answer? Thanks

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!