Design a 48th-order FIR bandpass filter with passband
rad/sample. Visualize its magnitude and phase responses.

Load `chirp.mat`

. The file contains a signal, `y`

, that has most of its power above `Fs/4`

, or half the Nyquist frequency. The sample rate is 8192 Hz.

Design a 34th-order FIR highpass filter to attenuate the components of the signal below `Fs/4`

. Use a cutoff frequency of 0.48 and a Chebyshev window with 30 dB of ripple.

Filter the signal. Display the original and highpass-filtered signals. Use the same *y*-axis scale for both plots.

Design a lowpass filter with the same specifications. Filter the signal and compare the result to the original. Use the same *y*-axis scale for both plots.

Design a 44th-order FIR filter that attenuates normalized frequencies below
rad/sample and between
and
rad/sample. Call it `bM`

.

Redesign `bM`

so that it passes the bands it was attenuating and stops the other frequencies. Call the new filter `bW`

. Use `fvtool`

to display the frequency responses of the filters.

Redesign `bM`

using a Hann window. (The string `'DC-0'`

is optional.) Compare the magnitude responses of the Hamming and Hann designs.

Redesign `bW`

using a Tukey window. Compare the magnitude responses of the Hamming and Tukey designs.