mm2712.m

来自「matlab7.0这本书的源代码」· M 代码 · 共 9 行

M
9
字号
[X,Y,Z] = peaks(30);x = X(1,:);              % vector of x axisy = Y(:,1);              % vector of y axisi = find(y>.8 & y<1.2);  % find y axis indices of holej = find(x>-.6 & x<.5);  % find x axis indices of holeZ(i,j) = nan;            % set values at hole indices to NaNssurf(X,Y,Z)xlabel('X-axis'), ylabel('Y-axis'), zlabel('Z-axis')title('Figure 27.12: Surface Plot with a Hole')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?