File Exchange

## Fast Fourier Transform (FFT) Animation using Matlab

version 1.0.0.0 (297 KB) by Mehmet E. Yavuz

### Mehmet E. Yavuz (view profile)

Time-progress animation of Fourier transform for varying input signal

Updated 25 Oct 2015

Code for the following animation : https://www.youtube.com/watch?v=-GYB7khbIA0

We show the progress of Fast Fourier Transform (FFT) of a time-domain signal as it changes in time. Matlab's fft() function is used for illustration, hence it should be noted that the function is assumed to be periodic. The number of FFT points is assumed to be same as the samples of time domain signal to prevent zero padding when the full domain is filled.
In the beginning a sinusoidal signal at 50 Hertz (1*sin(2*pi*50*t)) starts to develop and slowly fills the full domain. Then, another sinusoidal signal at a higher amplitude and 100 Hertz (1.5*sin(2*pi*100*t)) is added to this signal. Later, a third sinusoidal signal at 200 Hz replaces the 100 Hz one. Following this, a DC component (0 Hz) is inserted and finally, the DC component is removed. At each stage, the the development of frequency components can clearly be observed. In the frequency spectrum, first a 50Hz component starts to build up along with lower and higher frequencies. The reason for wider spectrum is the fact that sinusoidal signal fills the domain within an increasing time window (hence introduction of sinc components). Once the full domain is filled with the sinusoidal, then only 50 Hz component remains due to the fact that the signal assumes to be periodic in Matlab fft function.

zjxugd

Sean Sun

### Sean Sun (view profile)

the code is just to indicate the figure of fft, not the animation

Sean Sun

### Sean Sun (view profile)

Thanks!
Would you please give the .m files of animation ?

Chris Wong

Randy Consuegra

### Randy Consuegra (view profile)

When I run this script, it doesnt show any animation. Just a plot. But has been very helpfull thnks a lot.

Death Saurer

Death Saurer

### Death Saurer (view profile)

That so very good day.
Let me turn to you asking for your kind help in order to get the code of the Fourier transform of continuous-time (FFT) directly and inversely, since my knowledge in matlab are not very good.
I appreciate who I can help and collaborate.
Excuse my bad English and my native language is Spanish

cristhian cango

### cristhian cango (view profile)

muchas gracias, me sirvió de mucho para entender las series de furier.