www.gusucode.com > signal 案例源码程序 matlab代码 > signal/TheSincFunctionExample.m
%% 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 of width $2\pi$ and unit height. The following % equation defines the sinc function: % % $${{\sin\pi x}\over{\pi x}} = % {1\over{2\pi}}\int_{-\pi}^\pi e^{j\omega x}\,d\omega.$$ % % The sinc function has a value of 1 when $x$ is equal to zero, and a value % of $\sin(\pi x)/\pi x$ for all other elements of $x$. %% % To plot the sinc function for a linearly spaced vector with values % ranging from $-5$ to $5$, use the following commands: x = linspace(-5,5); y = sinc(x); plot(x,y) grid