How do you find the magnitude of a Fourier transform in MATLAB?
y = fft(x); fs = 1/Ts; f = (0:length(y)-1)*fs/length(y); When you plot the magnitude of the signal as a function of frequency, the spikes in magnitude correspond to the signal's frequency components of 15 Hz and 20 Hz.
What does magnitude of FFT tell you?
The output of the FFT is a complex vector containing information about the frequency content of the signal. The magnitude tells you the strength of the frequency components relative to other components. The phase tells you how all the frequency components align in time.