Fast Fourier Transform or FFT is a powerful tool to visualize a signal in the frequency domain. Shown below is the FFT of a signal (press the play button) composed of four sinusoids at frequencies of 50Hz, 100Hz, 200Hz and 400Hz. The sampling frequency is set at 1000Hz, more than twice the maximum frequency of the composite signal. The amplitude of the sinusoids diminishes with increasing frequency and this is also reflected in the frequency domain. Play with the code, decrease the frequencies, increase the power, visualize the FFT output on logarithmic scale!