用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 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函数