i want to subplot 4 string containg cell array from ( sin, cos, tan,sinh) and vector (+,o,*,x,s) and the mathmatical function should be ploted in interval (-2pi,2pi)with step 0.3
How do you call your objective function? What is passed into it?
Answer: X
Note that nonlcon takes two arguments, yet fmincon is pretty sure it takes only one argument, because fmincon passes the same thing to the constraint function that it passes to the objective. You pass in nonlcon into fmincon.
Perhaps you think that you called fmincon with nonlcon2, which is indeed a function only of X. You did not. In fact, it appears that you never use nonlcon2.
I'd suggest you are being sloppy with your function names. This is what causes bugs. Be more careful with your names, and your code will improve. It might even run. :)
Best Answer