www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SpecifyZAxisLimitsExample.m

    %% Specify z-Axis Limits 
% Specify the _z_-axis limits for the graph.

% Copyright 2015 The MathWorks, Inc.


[x,y] = meshgrid([-1.75:.2:3.25]);
z = x.*exp(-x.^2-y.^2);

figure
surf(x,y,z)
zlim([-0.35,0.3])