Wednesday, March 27, 2013

Generating Square Wave from Fourier Series by Using MATLAB


Fourier series always suprised me.. Harmonics are amazing.. They added together and we get another function.. Let's see it by our own eyes. How harmonics summation give the square wave?
To do this and see step by step I wrote a small m-file and used pause command to see changes in function when harmonics are added. Here you are the codes in the mfile:



If you haven't installed matlab on your system, you may wanna see my post about how to install matlab on linux.

Copy the code into a new mfile and execute it.. See the square wave generator from fourier series... :)



No comments:

Post a Comment