wp1 = 0.4*pi; wp2 = 0.6*pi;
ws1 = 0.3*pi; ws2 = 0.7*pi;
tr_width = min((wp1-ws1),(ws2-wp2))
tr_width =0.3142
M = ceil(6.2*pi/tr_width) + 1
M = 63
n=[0:1:M-1];
wc1 = (ws1+wp1)/2; wc2 = (wp2+ws2)/2;
wc=[wc1/pi,wc2/pi];
window= hanning(M);
[h1,w]=freqz(window,1);
figure(1);
subplot(2,1,1)
stem(window);
axis([0 60 0 1.2]);
grid;
xlabel('n');
title('Hanning窗函数');
subplot(2,1,2)
plot(w/pi,20*log(abs(h1)/abs(h1(1))));
axis([0 1 -350 0]);
grid;
xlabel('w/\pi');
ylabel('幅度(dB)');
title('Hanning窗函数的频谱');
hn = fir1(M-1,wc, hanning (M));
[h2,w]=freqz(hn,1,512);
figure(2);
subplot(2,1,1)
stem(n,hn);
axis([0 60 -0.25 0.25]);
grid;
xlabel('n');
ylabel('h(n)');
title('Hanning窗函数的单位脉冲响应');
subplot(2,1,2)
plot(w/pi,20*log(abs(h2)/abs(h2(1))));
grid;
xlabel('w/\pi');
ylabel('幅度(dB)');
figure(3);
phase=angle(h1);
plot(phase);
axis([1 pi -1 0]);
xlabel('w/\pi');
ylabel('线性相位');
title('Hanning窗函数相位特性曲线')
Low-pass-filter-simulation-.rar_Chebyshev
版权申诉
5 浏览量
2022-07-15
04:53:24
上传
评论
收藏 2KB RAR 举报
APei
- 粉丝: 63
- 资源: 1万+
最新资源
- 以简单、易用、高性能为目标、开源的时序数据库,支持Linux及Windows, Time Series Database.zip
- python-leetcode面试题解之第198题打家劫舍-题解.zip
- python-leetcode面试题解之第191题位1的个数-题解.zip
- python-leetcode面试题解之第186题反转字符串中的单词II-题解.zip
- 一个基于python的web后端高性能开发框架,下载可用
- python-leetcode面试题解之第179题最大数-题解.zip
- python-leetcode面试题解之第170题两数之和III数据结构设计-题解.zip
- python-leetcode面试题解之第168题Excel表列名称-题解.zip
- python-leetcode面试题解之第167题两数之和II输入有序数组-题解.zip
- python-leetcode面试题解之第166题分数到小数-题解.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈