用matlab绘制x=(1+cosu)cosv,y=(1+cosu)sinv,z=sinu图像?u=-2*pi:0.01:2*pi;v=-2*pi:0.01:2*pi;x=(1+cosu).*cosv;y=(1+cosu).*sinv;z=sinu;polt3(x,y,z)xlabel('x');ylabel('y');zlabel('z');grid但是出现了:Error using plot3Vectors must be the
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 11:51:05
用matlab绘制x=(1+cosu)cosv,y=(1+cosu)sinv,z=sinu图像?u=-2*pi:0.01:2*pi;v=-2*pi:0.01:2*pi;x=(1+cosu).*cosv;y=(1+cosu).*sinv;z=sinu;polt3(x,y,z)xlabel('x');ylabel('y');zlabel('z');grid但是出现了:Error using plot3Vectors must be the
用matlab绘制x=(1+cosu)cosv,y=(1+cosu)sinv,z=sinu图像?
u=-2*pi:0.01:2*pi;
v=-2*pi:0.01:2*pi;
x=(1+cosu).*cosv;
y=(1+cosu).*sinv;
z=sinu;
polt3(x,y,z)
xlabel('x');ylabel('y');zlabel('z');
grid
但是出现了:
Error using plot3
Vectors must be the same lengths.
这是哪儿出现了错误?应该如何改?
用matlab绘制x=(1+cosu)cosv,y=(1+cosu)sinv,z=sinu图像?u=-2*pi:0.01:2*pi;v=-2*pi:0.01:2*pi;x=(1+cosu).*cosv;y=(1+cosu).*sinv;z=sinu;polt3(x,y,z)xlabel('x');ylabel('y');zlabel('z');grid但是出现了:Error using plot3Vectors must be the
一楼正解
plot3函数只适用于:X(t),Y(t),Z(t)型的函数
对于符合型:Z=f(X,Y)型,需要mesh或者surf函数