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:

Number of function evaluation exceeded, or

Number of iteration exceeded.

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).

Now even if I increase any of the tolerance constraint or max number of iterations, I still get the same problem.

Any help is appreciated.