Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Solve by using MATLAB both of them In MATLAB command window, type the following

ID: 2082120 • Letter: S

Question

Solve by using MATLAB both of them

In MATLAB command window, type the following code and hit Return to study usage of the MATLAB function firpm(). MATLAB > > help firpm Design a lowpass FIR filter with the following specifications Number of filter taps = determined on your trials Sampling rate = 8000 Hz Passband: 0 - 1200 Hz Stopband 1500 - 4000 Hz Passband ripple: l dB Stopband attenuation: 40 dB Print the lowpass FIR filter coefficients and plot the frequency responses using MATLAB. MATLAB > > freqz (bLP, 1, 5 12, 8000); % sampling rate = 8000 Hz Label and print your graph. What are the filter gains for the stopband at 3000 Hz and passband at 200 Hz based on the plot of the magnitude response? Design a bandpass FIR filter with the following specifications: Number of filter taps = determined on your trials Sampling rate = 8000 Hz Pass band: 1200 - 1600 Hz Lower stopband 0 - 800 Hz Upper stopband 2000 - 4000 Hz Passband ripple: 1 dB Stopband attenuation: 40 dB Print the band pass FIR filter coefficients and plot the frequency responses using MATLAB. MATLAB > > freqz (bBP, 1, 5 12, 8000); % sampling rate = 8000 Hz Label and print your graph What are the filter gains for the stopband at 500 Hz and 2500 Hz, and passband at 1400 Hz based on the plot of the magnitude frequency response?

Explanation / Answer

clc;
close all;
clear all;

Fs = 8000;
pf1 = 1200/Fs;
pbrip = 1;

sf1 = 1500/Fs;
sfattn = 40;

bp = designfilt('lowpassfir', ...
    'PassbandFrequency1',pf1,'PassbandRipple',pbrip,'PassbandFrequency2',pf2, ...
    'StopbandFrequency2',sf1,'StopbandAttenuation2',sfattn);

[h,w] = freqz(bp,1024);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote