Matlab中Inner matrix dimensions must agree是怎么回事?
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/13 03:28:04
Matlab中Inner matrix dimensions must agree是怎么回事?
h=[200,600,600,600,600];
H=[51000 51000 71400 128000 370000];
R=6400;
a=(h+H+2*R)/2;
c=(H-h)/2;
b=sqrt(a*a-c*c);
t=(0:.1:2)*pi;
x=a*cos(t);
y=b*sin(t);
plot(x,y,'-r')显示第六行Inner matrix dimensions must agree.是怎么回事啊?
h=[200,600,600,600,600];
H=[51000 51000 71400 128000 370000];
R=6400;
a=(h+H+2*R)/2;
c=(H-h)/2;
b=sqrt(a*a-c*c);
t=(0:.1:2)*pi;
x=a*cos(t);
y=b*sin(t);
plot(x,y,'-r')显示第六行Inner matrix dimensions must agree.是怎么回事啊?
Matlab中默认的变量是矩阵,也就是说,h,H都默认为矩阵,在进行乘法运算时 都必须符合乘法运算规则,左矩阵的行数要等于右矩阵的列数 要想使其能运行出结果,把矩阵转置运算符是单引号“‘”
如下是正确程序
h=[200,600,600,600,600];
H=[51000 51000 71400 128000 370000];
R=6400;
a=(h+H+2*R)/2;
c=(H-h)/2;
b=sqrt(a*a'-c*c');
t=(0:.1:2)*pi;
x=a'*cos(t);
y=b'*sin(t)';
plot(x,y,'-r')
如下是正确程序
h=[200,600,600,600,600];
H=[51000 51000 71400 128000 370000];
R=6400;
a=(h+H+2*R)/2;
c=(H-h)/2;
b=sqrt(a*a'-c*c');
t=(0:.1:2)*pi;
x=a'*cos(t);
y=b'*sin(t)';
plot(x,y,'-r')
Matlab中Inner matrix dimensions must agree是怎么回事?
Matlab中Inner matrix dimensions must agree.
matlab中Inner matrix dimensions must agree,
matlab出错 “Inner matrix dimensions must agree.”
MATLAB :(Inner)Matrix dimensions must agree.
Inner matrix dimensions must agree
Inner matrix dimensions must agree.
Matlab出现Inner matrix dimensions must agree问题
求助 matlab 高手 Inner matrix dimensions must agree
matlab,Inner matrix dimensions must agree.哪里出错了
Matlab中出现Error using ==> *Inner matrix dimensions must agree
matlab“Inner matrix dimensions must agree.”这个错误怎么改啊