Design a 6th-order lowpass Chebyshev Type II filter with 40 dB of stopband attenuation and a stopband edge frequency of 300 Hz, which, for data sampled at 1000 Hz, corresponds to
rad/sample. Plot its magnitude and phase responses. Use it to filter a 1000-sample random signal.

Design a 6th-order Chebyshev Type II bandstop filter with normalized edge frequencies of
and
rad/sample and 50 dB of stopband attenuation. Plot its magnitude and phase responses. Use it to filter random data.

Design a 9th-order highpass Chebyshev Type II filter with 20 dB of stopband attenuation and a stopband edge frequency of 300 Hz, which, for data sampled at 1000 Hz, corresponds to
rad/sample. Plot the magnitude and phase responses. Convert the zeros, poles, and gain to second-order sections for use by `fvtool`

.

Design a 20th-order Chebyshev Type II bandpass filter with a lower stopband frequency of 500 Hz and a higher stopband frequency of 560 Hz. Specify a stopband attenuation of 40 dB and a sample rate of 1500 Hz. Use the state-space representation. Design an identical filter using `designfilt`

.

Convert the state-space representation to second-order sections. Visualize the frequency responses using `fvtool`

.

Design a 5th-order analog Butterworth lowpass filter with a cutoff frequency of 2 GHz. Multiply by
to convert the frequency to radians per second. Compute the frequency response of the filter at 4096 points.

Design a 5th-order Chebyshev Type I filter with the same edge frequency and 3 dB of passband ripple. Compute its frequency response.

Design a 5th-order Chebyshev Type II filter with the same edge frequency and 30 dB of stopband attenuation. Compute its frequency response.

Design a 5th-order elliptic filter with the same edge frequency, 3 dB of passband ripple, and 30 dB of stopband attenuation. Compute its frequency response.

Plot the attenuation in decibels. Express the frequency in gigahertz. Compare the filters.

The Butterworth and Chebyshev Type II filters have flat passbands and wide transition bands. The Chebyshev Type I and elliptic filters roll off faster but have passband ripple. The frequency input to the Chebyshev Type II design function sets the beginning of the stopband rather than the end of the passband.