Why do I get a high frequency oscillation when I take the FFT of a rectangular pulse?

Illustration
Jessica - 2021-03-18T10:55:25+00:00
Question: Why do I get a high frequency oscillation when I take the FFT of a rectangular pulse?

Why do I get a high frequency oscillation when I take the FFT of a rectangular pulse?   I am taking the FFT of a Rectangular Pulse and I expect a nice smooth Sinc wave. But what I get is a Sinc wave with a high frequency oscillation. Why is this?

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

The results you are getting from the FFT are correct and expected. The reason for the oscillations is because the Rectangular Pulse is not centered about zero, which results in a phase shift of the FFT output. The phase shift is essentially negating every other element (odd samples) of the output of the FFT which causes the high frequency oscillation you're observing. This is explained by the time-shifted Fourier Transform Theorem.
 
One way to avoid the oscillations is to use FFTSHIFT on the Rectangular Pulse before taking the FFT. For example if "rect" is the Rectangular Pulse:
 
fftrect=fftshift(fft(fftshift(rect)));


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!