%% Graphing the sinc Function
% This example shows how to evaluate and graph the two-dimensional sinc function, sin(R)/R, between the x and y directions. R is the distance from the origin, which is at the center of the matrix. Adding eps (a very small value) prevents a hole in the mesh at the point where R = 0.

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

% By default, MATLAB uses the current colormap to color the mesh.
% Copyright 2015 The MathWorks, Inc.