📄 mm2805.m
字号:
x = -7.5:.5:7.5; % data[X Y] = meshgrid(x); % create plaid dataR = sqrt(X.^2 + Y.^2)+eps; % create sombreroZ = sin(R)./R;
subplot(2,2,1)
surf(X,Y,Z,abs(del2(Z))) % absolute Laplacian
colormap(gray)
shading interp
axis tight off
title('Figure 28.5a: |Curvature|')
subplot(2,2,2)
[dZdx,dZdy] = gradient(Z); % compute gradient of surfacesurf(X,Y,Z,abs(dZdx)) % color varies with absolute slope in x-directionshading interp
axis tight off
title('Figure 28.5b: |dZ/dx|')
subplot(2,2,3)
surf(X,Y,Z,abs(dZdy)) % color varies with absolute slope in y-directionshading interp
axis tight off
title('Figure 28.5c: |dZ/dy|')
subplot(2,2,4)
dR = sqrt(dZdx.^2 + dZdy.^2);
surf(X,Y,Z,abs(dR)) % color varies with absolute slope in radiusshading interp
axis tight off
title('Figure 28.5d: |dR|')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -