Mathematics Previous page   Next Page

Magnitude and Phase of Transformed Data

Important information about a transformed sequence includes its magnitude and phase. The MATLAB functions abs and angle calculate this information.

To try this, create a time vector t, and use this vector to create a sequence x consisting of two sinusoids at different frequencies.

Now use the fft function to compute the DFT of the sequence. The code below calculates the magnitude and phase of the transformed sequence. It uses the abs function to obtain the magnitude of the data, the angle function to obtain the phase information, and unwrap to remove phase jumps greater than pi to their 2*pi complement.

Now create a frequency vector for the x-axis and plot the magnitude and phase.

The magnitude plot is perfectly symmetrical about the Nyquist frequency of 50 hertz. The useful information in the signal is found in the range 0 to 50 hertz.

two plots -- frequency vs. phase and frequency vs. abs. magnitude


Previous page  Introduction FFT Length Versus Speed Next page

© 1994-2005 The MathWorks, Inc.