This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

FIR Bandpass Filter with Asymmetric Attenuation

Use the Filter Designer app to create a 50th-order equiripple FIR bandpass filter to be used with signals sampled at 1 kHz.

N = 50;
Fs = 1e3;

Specify that the passband spans frequencies of 200–300 Hz and that the transition region on either side has a width of 50 Hz.

Fstop1 = 150;
Fpass1 = 200;
Fpass2 = 300;
Fstop2 = 350;

Specify weights for the optimization fit:

  • 3 for the low-frequency stopband

  • 1 for the passband

  • 100 for the high-frequency stopband

Open the Filter Designer app.

Wstop1 = 3;
Wpass = 1;
Wstop2 = 100;


Use the app to design the rest of the filter. To specify the frequency constraints and magnitude specifications, use the variables you created.

  1. Set Response Type to Bandpass.

  2. Set Design Method to FIR. From the drop-down list, select Equiripple.

  3. Under Filter Order, specify the order as N.

  4. Under Frequency Specifications, specify Fs as Fs.

  5. Click Design Filter.

See Also