MATLAB: Fmincon stoped, converged to infeasible point

converged to infeasible pointfmincon

Emergency call for help!!!! Hi there, friends in MATLAB community. Code below is from a piece of my assignment whose due is at 8 hours later. I really appreciate if any of you could give some help or advise. Thank you so much!!!!!

Best Answer

fmincon is strictly a local minimizer. If there is a local minima near your starting point then its gradient based methods will typically get stuck there. There are no fmincon options you can use that will change that: it is inherent in the algorithm used. In your case the local minima is outside of the lb ub you have configured.
You have three choices:
  1. change the lb and ub
  2. use a different x0 in hopes that it finds a minima in range
  3. use a different minimizer such as fminsearch which is less prone to getting caught in local minima (but can happen). However implementing lb and ub in fminsearch in particular is not easy.
Related Question