Question

The MATLAB program below designs a lowpass filter for a passband edge frequency of 250Hz and a stopband edge of 350Hz. The sa
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is given below in bold letters.

clear;close all;
fpass = 250;
fstop = 350;
fs = 2000;
wp = 2*pi* fpass/fs;
ws = 2*pi* fstop/fs;
M = ceil(6.6*pi/(ws-wp))+1;
wc = (ws+wp)/2;
n0 = (M-1)/2;
n = 0:M-1;
hLP = sin(wc*(n-n0))./(wc*(n-n0));
hLP(n0+1) = 1;
w = 0.54-0.46*cos(2*pi*n/(M-1));
wvtool(hLP.*w);


% part b
hHP = (-1).^n .* hLP;
wvtool(hHP.*w);


% part c
w0 = 2*pi*50/fs;
hBP = (2*cos(n*w0)) .* hLP;
wvtool(hBP.*w);

Frequency domain Time domain 20 0.8 -20 0.6 -40 fhi 0.4 -60 哎0.2 -80 -100 0.2 -120 -140 0.4 10 20 30 40 50 60 Samples 0 0.2

Frequency domain Time domain 20 0.8 0ii -20 0.4 -40 fhi 0.2 시 N 0 -60 0.2 -80 0.4 -0.6 0.8 -100 -120 -140 10 20 30 40 50 60

Frequency domain Time domain 1.2 20 10 -10 0.6 命-20 0.4 3-30 Σ-40 :EA) 0.2 -50 -60 0.2 70 0.4 -80 10 20 30 40 50 60 Samples 0

Add a comment
Know the answer?
Add Answer to:
The MATLAB program below designs a lowpass filter for a passband edge frequency of 250Hz and...
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