Signal Processing Toolbox Previous page   Next Page

Step 5: Spectral Analysis in the Spectrum Viewer

You can analyze the frequency content of a signal using the Spectrum Viewer, which estimates and displays a signal's power spectral density.

For example, to analyze and compare the spectra of noise and blnoise:

  1. Create a power spectral density (PSD) object, spect1, that is associated with the signal noise, and a second PSD object, spect2, that is associated with the signal blnoise.
  2. Open the Spectrum Viewer to analyze both of these spectra.
  3. Print both spectra.

Creating a PSD Object From a Signal

  1. Click on SPTool, or select SPTool from the Window menu of any active open GUI. SPTool is now the active window.
  2. Select the noise[vector] signal in the Signals list of SPTool.
  3. Press Create in the Spectra list.
  1. The Spectrum Viewer is activated, and a PSD object (spect1) corresponding to the noise signal is created in the Spectra list. The PSD is not computed or displayed yet.

  1. Press Apply in the Spectrum Viewer to compute and display the PSD estimate spect1 using the default parameters.
  1. The PSD of the noise signal is displayed in the display region. The identifying information for the PSD's associated signal (noise) is displayed above the Parameters region.

    The PSD estimate spect1 is within 2 or 3 dB of 0, so the noise has a fairly "flat" power spectral density.

  1. Follow steps 1 through 4 for the bandlimited noise signal blnoise to create a second PSD estimate spect2.
  1. The PSD estimate spect2 is flat between 750 and 1250 Hz and has 75 dB less power in the stopband regions of filt1.

Opening the Spectrum Viewer with Two Spectra

  1. Reactivate SPTool again, as in step 1 above.
  2. Shift+click on spect1 and spect2 in the Spectra list to select them both.
  3. Press View in the Spectra list to reactivate the Spectrum Viewer and display both spectra together.

Printing the Spectra

Before printing the two spectra together, use the color and line style selection button, , to differentiate the two plots by line style, rather than by color.

To print both spectra:

  1. Press the Print Preview button, , in the toolbar on the Spectrum Viewer.
  2. From the Spectrum Viewer Print Preview window, drag the legend out of the display region so that it doesn't obscure part of the plot.
  3. Press the Print button in the Spectrum Viewer Print Preview window.


Previous page  Step 4: Analyzing a Signal Exporting Signals, Filters, and Spectra Next page

© 1994-2005 The MathWorks, Inc.