Error using mubiao2Too many input arguments.
Error in fmincon (line 631) initVals.f = feval(funfcn{3},X,varargin{:});
Error in eg6_8 (line 4)[x,fval]=fmincon(@mubiao2,x0,A,b,[],[],[],[],@yueshu2)
Caused by: Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.
主程序
x0=[10;10];A=[-1,1;1,0];b=[10;10];[x,fval]=fmincon(@mubiao2,x0,A,b,[],[],[],[],@yueshu2)
目标函数
function f=mubiao2;f=(x(1)-5)^2+4*(x(2)-6)^2;
非线性约束
function[g,ceq]=yueshu2(x);g(1)=64-x(1)^2-x(2)^2;ceq=[];
老是出现Caused by: Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.这个东西
求解啊 !!!!
谢谢!!!
Error in fmincon (line 631) initVals.f = feval(funfcn{3},X,varargin{:});
Error in eg6_8 (line 4)[x,fval]=fmincon(@mubiao2,x0,A,b,[],[],[],[],@yueshu2)
Caused by: Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.
主程序
x0=[10;10];A=[-1,1;1,0];b=[10;10];[x,fval]=fmincon(@mubiao2,x0,A,b,[],[],[],[],@yueshu2)
目标函数
function f=mubiao2;f=(x(1)-5)^2+4*(x(2)-6)^2;
非线性约束
function[g,ceq]=yueshu2(x);g(1)=64-x(1)^2-x(2)^2;ceq=[];
老是出现Caused by: Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.这个东西
求解啊 !!!!
谢谢!!!