Question
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
Neeta Dsouza
PhD Expert
Answered Aug 24, 2026
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)));
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related matlab Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →