
Create a program that calculates the frequency response of a low-pass, high-pass, band-pass, or band-stop filter given number of taps, sampling frequency, and cut-off frequency for low-pass and high- pass filters and upper and lower cut-off frequencies for band-pass and band-stop filters. Also, four window functions, triangular, Hanning, Hamming, and Blackman will be used to smooth out the original filter’s response and to eliminate the oscillations in the pass and stop bands due to Gibbs effect.
Low-pass: 7 taps, hamming, sampling rate 8000, cut-off 800
High-pass: 33 taps, hanning, sampling rate 36000, cut-off 8000
Band-pass: 201 taps, blackman, sampling rate 36000, lower cut-off 4e3, upper cut-off 8e3
Band-stop: 1001 taps, triangular, sampling rate 36000, lower cut-off 4000, upper cut-off 8000
Matlab code, please
Thank you