Question

The impulse response of an ideal band pass filter is given by the equation: n 0 h(n)=-sin(nw.) wl sin(nw!) nヂ0 Using the abov

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is given below in bold letters.

clc;
close all;
clear all;

% define w1 ans w2 as follows
w1 = 0.2*pi;
w2 = 0.3*pi;

% define n as follows
n = -50:50;
h = w2/pi * sin(n*w2)./(n*w2) - w1/pi * sin(n*w1)./(n*w1);
h(51) = w2/pi-w1/pi;

% bartlett window
W = bartlett(length(n))' ;

% modify the filter with bartlett window
h = h .* W;

% plot the impulse response in time domain
figure;stem(n,h);grid on;xlabel('n');title('filter impulse response');
% plot the frequency respons of the filter.
figure;
freqz(h,1);title('frequecny response of the filter');
grid on;

filter impulse response 0.1 0.08 0.06 0.04 0.02 0 0.02 0.04 0.06 0.08 -0.1 -50 40 30 -20 10 0 10 20 30 40 50fre quecny response of the filter 920 o -40 -60 0 0.1 0.2 0.3 0. 0.5 0.6 0.7 0.80.1 Normalized Frequency (xT rad/sample) -500

Add a comment
Know the answer?
Add Answer to:
The impulse response of an ideal band pass filter is given by the equation: n 0 h(n)=-sin(nw.) wl...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT