Main Content

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π and unit height:

sincx=12π-ππejωxdω={sinπxπx,x0,1,x=0.

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

Figure contains an axes object. The axes object contains an object of type line.

See Also

|