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

📄 freq.m

📁 设计了巴特沃斯、车比雪夫I
💻 M
字号:
function [H,w]=freq(b, a,sztitle)
[H,w]=freqz(b, a, 1000, 'whole', 1);%求频率响应;
Hr=20*log10(abs(H)); %求幅频
%Hr=abs(H);
Hphase=angle(H); %求相频
Hphase=unwrap(Hphase); %解卷绕
subplot(2, 2, 1)
plot(w,abs(H))
ylabel('幅频响应')
xlabel('归一化频率')
%axis([0 0.5  -300 0]);
grid on;
title(sztitle) 
subplot(2, 2, 2)
plot(w,Hr); 
title(sztitle)  
grid on;
%axis([0 0.5  -300 100]);
ylabel('db')
xlabel('归一化频率')
subplot(2,2,[3 4])
plot(w,Hphase); 
%axis([0 0.5 -7 0]);
grid on;
ylabel('相频响应')
xlabel('归一化频率')

⌨️ 快捷键说明

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