File Exchange

image thumbnail

Fourier Series Animation using Harmonic Circles

version (110 KB) by Mehmet E. Yavuz
Animation showing square wave synthesis using harmonics


Updated 03 Feb 2015

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

The animation is divided into two parts. In the first part, it shows first three harmonics as circles and how they are mapped to sinusoids. In the second part, it combines each harmonics and circles to obtain the synthesis of the square wave.
The whole animation can be watched at

Comments and Ratings (10)

junaid ali

I am having an error in line 65 ds2nfu undefined function???

Pi Ting

very helpful

amr elsawy

Kamila Zdybal


Ali (view profile)

That is the best illustration.


Li HaiChao


Jean (view profile)

Great! Thanks a lot!


Tunc (view profile)

Excellent! Very efficient way of simulating the underlying basics of the Fourier Theory. Thank you!


Link simplified

Link to animation added

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

Inspired: Decomposition of a signal in time domain

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor