Optimization stops prematurely (MATLAB) <p>I'm trying my best to work it out with fmincon in MATLAB. When I call the function, I get one of the two following errors:</p> <p>Number of function evaluation exceeded, or</p> <p>Number of iteration exceeded.</p> <p>And when I look at the solution so far, it is way off the one intended (I know so because I created a minimum vector).</p> <p>Now even if I increase any of the tolerance constraint or max number of iterations, I still get the same problem. </p> <p>Any help is appreciated.</p>