三维绘图三维绘图polt3函数语法:plot3(x,y,z)x=0:0.1:10*pi;
y=sin(x);
z=cos(x);
plot3(x,y,z);三维曲线矩形网格二维曲线先找到x,再找到对应的y,绘制点x=1:2*pi;
y=sin(x);
plot(x,y,'o-');三维曲线先找到(x,y),找到对应的z,绘制点网线图表图语法:[x,y]=meshgrid(x,y)x=-2:0.5:2;
y=-2:0.5:2;
[x,y]=meshgrid(x,y);
plot(x,y,'o');mesh图[x,y]=meshgrid(-2:0.5:2);
z=ones(size(x));
mesh(x,y,z);[x,y]=meshgrid(-8:0.5:8);
z=sin(x);
mesh(x,y,z);[x,y]=meshgrid(-8:0.1:8);
z=sin(x)+cos(y);
mesh(x,y,z);表面图-surf语法:surf(x,y,z)[x,y]=meshgrid(-5:0.5:5);
z=ones(size(x));
su
技术
· 2019-01-08
· 286 人浏览
一只胖橘