%% The Sinc Function
% The sinc function computes the mathematical sinc function for an input vector or matrix x. Viewed as a function of time, or space, the sinc function is the inverse Fourier transform of the rectangular pulse in frequency centered at zero, with width 2\pi and unit height:
% \textrm{sinc}\;x=\frac{1}{2\pi }\int_{-\pi }^{\pi } e^{j\omega x} \;d\omega =\left\lbrace \begin{array}{cc}
% \frac{\sin \;\pi x}{\pi x}, & x\not= 0,\\
% 1, & x=0\ldotp
% \end{array}\right.
% To plot the sinc function for a linearly spaced vector with values ranging from -5 to 5, use these commands:

x = linspace(-5,5);
y = sinc(x);
plot(x,y)
grid

% Copyright 2012 The MathWorks, Inc.