⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 program_3_2.m

📁 《数字信号处理:基于计算机的方法(第三版)》资源下载第三部分。 著者: (美)米特拉著 作译者: 孙洪等译 ISBN号: 7-121-02652-X 出版日期: 2006-06 出版
💻 M
字号:
% Program 3_2
% Generate the filter coefficients
h1 = ones(1,5)/5; h2 = ones(1,14)/14;
%  Compute the frequency responses
[H1,w] = freqz(h1, 1, 256);
[H2,w] = freqz(h2, 1, 256);
%  Compute and plot the magnitude responses
m1 = abs(H1); m2 = abs(H2);
plot(w/pi,m1,'r-',w/pi,m2,'b--');
ylabel('Magnitude'); xlabel('\omega/\pi');
legend('M=5','M=14');
pause
%  Compute and plot the phase responses
ph1 = angle(H1)*180/pi; ph2 = angle(H2)*180/pi;
plot(w/pi,ph1,w/pi,ph2);
ylabel('Phase, degrees');xlabel('\omega/\pi');
legend('M=5','M=14');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -