matlab 出错must have 6 column(s).
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/06 10:49:35
matlab 出错must have 6 column(s).
function f=fun1(x)
f=-x(1)*x(2)*x(3);
x0=[10;10;10];
A=[-1 -2 -2
1 2 2];
b=[0;72];
[x,fval,exitflag]=fmincon(@fun1,A,b,[],[])
这是两个matlab M文件,就是A矩阵有问题,我觉得没问题啊,他非说A must have 6 column(s)..
function f=fun1(x)
f=-x(1)*x(2)*x(3);
x0=[10;10;10];
A=[-1 -2 -2
1 2 2];
b=[0;72];
[x,fval,exitflag]=fmincon(@fun1,A,b,[],[])
这是两个matlab M文件,就是A矩阵有问题,我觉得没问题啊,他非说A must have 6 column(s)..
少写了一个参数x0:
[x,fval,exitflag]=fmincon(@fun1,x0,A,b)
[x,fval,exitflag]=fmincon(@fun1,x0,A,b)
matlab 出错must have 6 column(s).
Error using fmincon (line 300) A must have 3 column(s).
matlab出错 “Inner matrix dimensions must agree.”
matlab,Inner matrix dimensions must agree.哪里出错了
matlab 基础出错,求指导 Matrix must be square
matlab出错? ? Error using ==> mpower Inputs must be 2-D.
matlab 出错Error using ==> mrdivide Matrix dimensions must agr
matlab报错Z must be a matrix, not a scalar or vector,哪里出错了?
matlab出错Error using ==> times Matrix dimensions must agree.
matlab为什么计算出错?
matlab 求和的出错
matlab 程序出错