Question

1. The impulse response of an ideal band pass filter is given by the equation: n=0 h(n)w2 sin(n w2) w1 sin (n w1) T nwW2 Usin

Do it using Matlab.

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

MATLAB code is given below in bold letters. copy this code and paste it in am m file and name it P1.m

clc;
close all;
clear all;

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

% define n as follows
N = 100;
n = 0:N; % this corresponds to 100th order filter

% deine the impulse response of the filter
h = w2/pi*sin(n*w2)./(n*w2) - w1/pi*sin(n*w1)./(n*w1);

% first sample is given below
h(1) = w2/pi - w1/pi ;


% bartlett window implementation
h = h.*bartlett(N+1)';


% frequency response of the filter with bartlett window
figure;freqz(h,1);grid on;
title('Frequency response of the filter with bartlett window');

Frequency response is plotted below

Frequency response of the filter with bartlett window -20 g -60 -80 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.91 Normalized Frequen

Add a comment
Know the answer?
Add Answer to:
1. The impulse response of an ideal band pass filter is given by the equation: n=0 h(n)w2 sin(n w...
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