Load the MAT-file `chirp`

. The file contains a signal, `y`

, sampled at a frequency
. `y`

has most of its power above
, or half the Nyquist frequency. Add random noise to the signal.

Design a 34th-order FIR highpass filter to attenuate the components of the signal below
. Specify a cutoff frequency of 0.48. Visualize the frequency response of the filter.

Filter the chirp signal. Plot the signal before and after filtering.

Change the filter from highpass to lowpass. Use the same order and cutoff. Filter the signal again. The result is mostly noise.

Design a 30th-order lowpass filter with a normalized cutoff frequency of
rad/sample. Plot the ideal frequency response overlaid with the actual frequency response.

Redesign the filter using a 64-point interpolation grid.

Redesign the filter using the 64-point interpolation grid and a 13-point interval around the cutoff frequency.

Design an FIR filter with the following frequency response:

Design the filter using a Hamming window. Specify a filter order of 50.

Repeat the calculation using a Kaiser window that has a shape parameter of 3.

Redesign the filter using the `designfilt`

function. `designfilt`

uses a rectangular window by default. Compute the zero-phase response of the filter over 1024 points.

Display the zero-phase responses of the three filters. Overlay the ideal response.