MATLAB: Exitflag=0 in fmincon accepted as accurate

covergenceexitflag=0fminconoptimization

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!

Best Answer

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