Hi,
I am doing a minimization with fmincon
Attached files are my constraint function “con”, objective function “obj”, and solution script “F_main”.
Although my objective function returns a scalar (you can try it), however when trying to solve I’m getting an error:
??? Error using ==> fmincon at 234 FMINCON only accepts inputs of data type double. Error in ==> F_main at 14 [x, fval] = fmincon(F,x0,A,b,Aeq,beq,lb,ub)
The only nonstandard thing that I have is the two equality constraints (two equations instead of one). But even when I used one equation for equality constraint just to check if that what was causing the error, the error still occur.
Please advise what is the source of this error in my script or function, and how can I fix it?
I appreciate considering my humble MATLAB experience.
Yaser
Best Answer