热心网友
回答时间:2024-03-28 03:52
x=[-2:0.1:2];
y=[-2:0.1:2];
[x,y]=meshgrid(x,y);
z=x.*exp(-x.^2-y.^2);
subplot(2,2,1),plot3(x,y,z);title('三维线图');
subplot(2,2,2),mesh(z);title('网线图');
subplot(2,2,3),surf(x,y,z);title('表面图');
subplot(2,2,4),surf(z);shading interp;title('带渲染效果的表面图');
收起