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

    %% Create Mesh Plot of Sinc Function
% Create a mesh plot of the sinc function, $z = \sin(r)/r$.

% Copyright 2015 The MathWorks, Inc.


[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;

figure
mesh(Z)