MATLAB实验题!!用凯塞窗设计一个数字带通滤波器,设计指标为:

2024-12-25 11:58:14
推荐回答(2个)
回答1:

clear;clc;close;
Rp=1;Rs=60;
N=49;n=[0:1:N-1];
wp1=0.35*pi;wp2=0.65*pi;ws1=0.2*pi;ws2=0.8*pi;
wc1=(ws1+wp1)/2;wc2=(ws2+wp2)/2;
ideal_lp(wc1,N);
ideal_lp(wc2,N);
hd1=ideal_lp(wc1,N);
hd2=ideal_lp(wc2,N);
w_han=(kaiser(N,5.658))';
h=(hd2-hd1).*w_han
[db,mag,pha,grd,w]=freqz_m(h,1);
plot(w/pi,db);xlabel('w/pi');ylabel('db');hold on;

回答2:

用matlab自带的fdatool吧。。。简单说来,就是在命令行打fdatool,然后回车