Matlab程序此问题如何处理:Error using ==> fminconA has the wrong number of columns.function f=fun1(x); f=exp(x(1))-5*x(1); x0=[0]; VLB=[1]; VUB=[2]; [x,fval]=fmincon('fun1',x0,VLB,VUB);

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/30 22:59:10

Matlab程序此问题如何处理:Error using ==> fminconA has the wrong number of columns.function f=fun1(x); f=exp(x(1))-5*x(1); x0=[0]; VLB=[1]; VUB=[2]; [x,fval]=fmincon('fun1',x0,VLB,VUB);
Matlab程序此问题如何处理:Error using ==> fminconA has the wrong number of columns.
function f=fun1(x); f=exp(x(1))-5*x(1); x0=[0]; VLB=[1]; VUB=[2]; [x,fval]=fmincon('fun1',x0,VLB,VUB);

Matlab程序此问题如何处理:Error using ==> fminconA has the wrong number of columns.function f=fun1(x); f=exp(x(1))-5*x(1); x0=[0]; VLB=[1]; VUB=[2]; [x,fval]=fmincon('fun1',x0,VLB,VUB);
……你的函数头多个分号……汗===》function f=fun1(x); x = 1.6094 fval = -3.0472