Using MATLAB and the Fast Fourier Transform (FFT), raw square wave data can be converted from the time domain to the frequency domain. The amplitude spectrum of the signal is calculated, and peaks are present at the fundamental frequency of the square wave and odd integer multiples of the fundamental frequency.