MATLAB 函数曲线出错clear;E=20;e=2.73;m=E.^2*e.^(-4);u=0.5;p=1:1:10;y=m*p./(1+u)*abs(m*p.^2-E.^2)*e.^(4*p.^2./(1-p.^2))-0.5;plot(p,y);Error using ==> mtimesInner matrix dimensions must agree.
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 15:23:56
MATLAB 函数曲线出错clear;E=20;e=2.73;m=E.^2*e.^(-4);u=0.5;p=1:1:10;y=m*p./(1+u)*abs(m*p.^2-E.^2)*e.^(4*p.^2./(1-p.^2))-0.5;plot(p,y);Error using ==> mtimesInner matrix dimensions must agree.
MATLAB 函数曲线出错
clear;
E=20;
e=2.73;
m=E.^2*e.^(-4);
u=0.5;
p=1:1:10;
y=m*p./(1+u)*abs(m*p.^2-E.^2)*e.^(4*p.^2./(1-p.^2))-0.5;
plot(p,y);
Error using ==> mtimes
Inner matrix dimensions must agree.
MATLAB 函数曲线出错clear;E=20;e=2.73;m=E.^2*e.^(-4);u=0.5;p=1:1:10;y=m*p./(1+u)*abs(m*p.^2-E.^2)*e.^(4*p.^2./(1-p.^2))-0.5;plot(p,y);Error using ==> mtimesInner matrix dimensions must agree.
clear;
E=20;
e=2.73;
m=E.^2*e.^(-4);
u=0.5;
p=1:1:10;
%所有的错误都集中在下面一行,应该正确应用 .* 这个命令,下面是修改正
%确的语句,请自行对照
y=m.*p./(1+u).*abs(m.*p.^2-E.^2).*e.^(4*p.^2./(1-p.^2))-0.5;
plot(p,y);