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 Version History

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

Cite As

Mehmet E. Yavuz (2021). Fourier Series Animation using Harmonic Circles (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (13)

Rafael Lima

Amazing and very illustrative.

Gerard Nagle

Excellent submission. I got it to work only when I downloaded into this mfile the ds2nfu function at the bottom of the script.
I do have the same question as Juinaid asked below, but, I guess, how would I get it to link back to the actual ds2nfu function on File Exchange rather than putting it into the actual script?
thanks in advance

Pawel Jastrzebski

junaid ali

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

Pi Ting

very helpful

amr elsawy

Kamila Zdybal


That is the best illustration.


Li HaiChao


Great! Thanks a lot!


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

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

Inspired: Decomposition of a signal in time domain

Community Treasure Hunt

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

Start Hunting!