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

📄 ex_07_05_1.m

📁 其中
💻 M
字号:
%  ex_07_05_1.m :  习题 7.5

clear all;
order = 54;
f = [0, 0.05, 0.1, 0.15, 0.18, 0.25, 0.3, 0.36, 0.41, 0.5] * 2;
a = [0, 0, 1, 1, 0, 0, 1, 1, 0, 0];
wtx = [1, 10, 1, 10, 1];
b = firpm(order, f, a, wtx);
[h, w] = freqz(b, 1, 512);
subplot(221);plot(f,a,w/pi,abs(h));grid;
subplot(222);plot(w/pi,20*log10(abs(h)));grid;

wtx = [10, 1, 10, 1, 10];
b = firpm(order, f, a, wtx);
[h, w] = freqz(b, 1, 512);
subplot(223);plot(f,a,w/pi,abs(h));grid;
subplot(224);plot(w/pi,20*log10(abs(h)));grid;

figure
wtx = [1, 1, 1, 1, 1];
b = firpm(order, f, a, wtx);
[h, w] = freqz(b, 1, 512);
subplot(221);plot(f,a,w/pi,abs(h));grid;
subplot(222);plot(w/pi,20*log10(abs(h)));grid;
subplot(223);stem(b,'k.');
pha=angle(h);pha=unwrap(pha);
subplot(224);plot(w/pi,pha);
%legend('Ideal','Parks-McLallan Design');
%figure;
%freqz(b, 1, 512);




⌨️ 快捷键说明

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