Signal Processing Toolbox Previous page   Next Page

Step 2: Designing a Filter

You can import an existing filter into SPTool, or you can design and edit a new filter using the Filter Designer.

In this example:

  1. Open a default filter in the Filter Designer.
  2. Specify an equiripple bandpass FIR filter.

Opening the Filter Designer

To open the Filter Designer, press the New button in SPTool. This opens the Filter Designer with a default filter named filt1.

Specifying the Bandpass Filter

Design an equiripple bandpass FIR filter with the following characteristics:

To modify your filter in the Filter Designer to meet these specifications:

  1. Change the filter sampling frequency to 5000 by entering this value in the Sampling Frequency text box.
  2. Select Equiripple FIR from the Algorithm list.
  3. Select bandpass from the Type list.
  4. Set the passband edge frequencies by entering 750 for Fp1 and 1250 for Fp2.
  5. Set the stopband edge frequencies by entering 500 for Fs1 and 1500 for Fs2.
  6. Type 0.01 into the Rp field and 75 into the Rs field.
  1. Rp sets the maximum passband ripple and Rs sets the stopband attenuation for the filter.

  1. Press the Apply button to design the new filter.When the new filter is designed, the magnitude response of the filter is displayed with a solid line in the display region.

  1. The resulting filter is an order-78 bandpass equiripple filter.


Previous page  Step 1: Importing a Signal into SPTool Step 3: Applying a Filter to a Signal Next page

© 1994-2005 The MathWorks, Inc.