exa1_45.m
来自「matlab应用实例。如:FIR、IIR数字滤波器设计等。」· M 代码 · 共 22 行
M
22 行
% exa1-45_transfer_function_reponse.m for example 1-45
% transfer function reponse
clear all;
fs=1000; %sample frequency unit in Hz
b=[0.3 0.2]; %sytem parameter
a=[1 -0.4 -0.7]; %sytem parameter
[h, f]=freqz(b, a, 256, fs);
mag=abs(h); %compute magnitude
ph=angle(h); %compute phase
ph=ph*180/pi; %unit in degrees
subplot(211)
plot(f,mag)
grid
xlabel('frequency(Hz)');
ylabel('magnitude');
subplot(212)
plot(f,ph)
grid
xlabel('frequency(Hz)');
ylabel('phase');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?