MATLAB: Lower bound in fmincon

fminconlower bound

Hi Dear all,
I have a question that in my programming, I have already setted the lower bound of every variable is zero. Why there is still some variables lower than zero?
Thank you

Best Answer

Only certain algorithms enforce bounds strictly (sqp, interior-point with 'AlwaysHonorConstraints' option active). Otherwise, they can be violated up to the TolCon tolerance parameter. Also, fmincon may have failed to find a solution. You need to check the exitflag output to see if it reported success.