(一)绘制曲线图
plot3(X,Y,Z)
plot3(X1,Y1,Z1,X2,Y2,Z2)
plot3(X,Y,Z,‘PropertyName’,PropertyValue)
plot3(X1,Y1,Z1,‘PropertyName’,PropertyValue,X2,Y2,Z2,‘ProperName’,PropertyValue)
figure
theta = 0:.01*pi:2*pi;
x = sin(theta);
y = cos(theta);
z = cos(4*theta);
plot3(x,y,z,'LineWidth',3);hold on;
theta = 0:.02*pi:2*pi;
x = sin(theta);
y = cos(theta);
z = cos(4*theta);
plot3(x,y,z,'rd','MarkerSize',3,'LineWidth',3);hold on;
(二)绘制网格图
(1)确定x,y的起始点,步长,终点。
(2)绘制3D网格图,计算机需要在Oxy平面进行采样,运用[X,Y] = meshgrid(x,y)来