Fourier series of square wave. Demo of Gibbs phenomenon with overshoot calculation

This file gives a simple demonstration of how a square wave can be approximated by Fourier series.
1.4K Downloads
Updated 25 Sep 2013

View License

This file gives a simple demonstration of how a square wave can be approximated by Fourier series. It does the following:
1) It demonstrates the effect of truncation of Fourier series coefficients, also known as Gibbs phenomenon.
2) Calculates the percentage overshoot.
3) Calculates the energy in the error between original and approximated signal

Cite As

अंकित अ. भुराने Ankit A. Bhurane (2024). Fourier series of square wave. Demo of Gibbs phenomenon with overshoot calculation (https://www.mathworks.com/matlabcentral/fileexchange/43590-fourier-series-of-square-wave-demo-of-gibbs-phenomenon-with-overshoot-calculation), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.14.0.0

It does the following:
1) Demonstrates the effect of truncation of Fourier series coefficients, also known as Gibbs phenomenon.
2) Calculates the percentage overshoot.
3) Calculates the energy in the error between original and approximated signal

1.3.0.0

This version also plots the Fourier coefficients. The is modified for simplicity and readability.

1.0.0.0