【急】matlab显示错误Warning:Matrix dimensions must agree,not rendering mesh.程序如下,求大师指教i=1;j=1;for b=4:0.1:6Y(j)=b;j=j+1; endfor a=4:0.1:6X(i)=a;for b=4:0.1:6x=0:pi/50:pi/2;y=(60*9.8/(1+4*(0.1)^2)).*(3.*cos(x)-0.6.*sin(x)-(1-2
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/27 04:15:35
![【急】matlab显示错误Warning:Matrix dimensions must agree,not rendering mesh.程序如下,求大师指教i=1;j=1;for b=4:0.1:6Y(j)=b;j=j+1; endfor a=4:0.1:6X(i)=a;for b=4:0.1:6x=0:pi/50:pi/2;y=(60*9.8/(1+4*(0.1)^2)).*(3.*cos(x)-0.6.*sin(x)-(1-2](/uploads/image/z/13149421-61-1.jpg?t=%E3%80%90%E6%80%A5%E3%80%91matlab%E6%98%BE%E7%A4%BA%E9%94%99%E8%AF%AFWarning%3AMatrix+dimensions+must+agree%2Cnot+rendering+mesh.%E7%A8%8B%E5%BA%8F%E5%A6%82%E4%B8%8B%2C%E6%B1%82%E5%A4%A7%E5%B8%88%E6%8C%87%E6%95%99i%3D1%3Bj%3D1%3Bfor+b%3D4%3A0.1%3A6Y%28j%29%3Db%3Bj%3Dj%2B1%3B+endfor+a%3D4%3A0.1%3A6X%28i%29%3Da%3Bfor+b%3D4%3A0.1%3A6x%3D0%3Api%2F50%3Api%2F2%3By%3D%2860%2A9.8%2F%281%2B4%2A%280.1%29%5E2%29%29.%2A%283.%2Acos%28x%29-0.6.%2Asin%28x%29-%281-2)
【急】matlab显示错误Warning:Matrix dimensions must agree,not rendering mesh.程序如下,求大师指教i=1;j=1;for b=4:0.1:6Y(j)=b;j=j+1; endfor a=4:0.1:6X(i)=a;for b=4:0.1:6x=0:pi/50:pi/2;y=(60*9.8/(1+4*(0.1)^2)).*(3.*cos(x)-0.6.*sin(x)-(1-2
【急】matlab显示错误Warning:Matrix dimensions must agree,not rendering mesh.程序如下,求大师指教
i=1;
j=1;
for b=4:0.1:6
Y(j)=b;
j=j+1;
end
for a=4:0.1:6
X(i)=a;
for b=4:0.1:6
x=0:pi/50:pi/2;
y=(60*9.8/(1+4*(0.1)^2)).*(3.*cos(x)-0.6.*sin(x)-(1-2*(0.1)^2).*exp(-0.2.*x)).*sqrt(a.^2.*(cos(x).^2)+b.^2.*(sin(x).^2))+60*144.*exp(-0.2.*x);
z=trapz(x,y);
z1=z+0.1*60*9.8*(10-a);
Z(j)=z1;
j=j+1;
end
i=i+1;
end
a=4:0.1:6;
b=4:0.1:6
[a,b]=meshgrid(a,b);
surf(a,b,Z)
大谢.回答即时会补分~
【急】matlab显示错误Warning:Matrix dimensions must agree,not rendering mesh.程序如下,求大师指教i=1;j=1;for b=4:0.1:6Y(j)=b;j=j+1; endfor a=4:0.1:6X(i)=a;for b=4:0.1:6x=0:pi/50:pi/2;y=(60*9.8/(1+4*(0.1)^2)).*(3.*cos(x)-0.6.*sin(x)-(1-2
i=1;
j=1;
for b=4:0.1:6
Y(j)=b;
j=j+1;
end
for a=4:0.1:6
X(i)=a;
for b=4:0.1:6
x=0:pi/50:pi/2;
y=(60*9.8/(1+4*(0.1)^2)).*(3.*cos(x)-0.6.*sin(x)-(1-2*(0.1)^2).*exp(-0.2.*x)).*sqrt(a.^2.*(cos(x).^2)+b.^2.*(sin(x).^2))+60*144.*exp(-0.2.*x);
z=trapz(x,y);
z1=z+0.1*60*9.8*(10-a);
Z(j)=z1;
j=j+1;
end
i=i+1;
end
a=4:0.1:6;
b=4:0.1:6;
[A,B]=meshgrid(a,b);
Z=reshape(Z(22:end),21,21);
surf(A,B,Z)