surface3d.m
来自「这么代码是用Matlab编写的」· M 代码 · 共 35 行
M
35 行
function surface3d()
subplot(2,3,1);
X=-3:0.3:3;Y=X;
[X,Y]=meshgrid(X,Y);
[theat,R]=cart2pol(X,Y);
Z=sinc(R);
contourf(peaks(30),10);
colorbar;
grid on;
title('Peaks Function-(CONTOURF&COLORBAR)');
subplot(2,3,2);
plot3(X,Y,Z);
grid on;
axis([-3 3 -3 3 -1 1]);
title('Sinc Fuction-(PLOT3)');
subplot(2,3,3);
waterfall(membrane(1));
title('L-shaped Membrane(1)');
subplot(2,3,4);
contour3(peaks(30),25);
title('Peaks Function-(CONTOUR3)');
subplot(2,3,5);
mesh(X,Y,Z);
axis([-3 3 -3 3 -1 1])
title('Sinc Function-(MESH)')
subplot(2,3,6);
surf(membrane(1));
title('L-shaped membrane-(SURF)')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?