例:y(n)=x(n)-x(n-3)
%减法滤波器
clear all;
clc;
fs=600;
b=[1,0,0,-1];
a=[1];
[h,f]=freqz(b,a,256,fs);
mag=abs(h);
ph=angle(h);
ph=ph*180/pi;
subplot(2,1,1)
plot(f,mag);
grid on
xlabel(‘频率(Hz)’);
ylabel(‘幅频特性’);
subplot(2,1,2)
plot(f,ph);
grid on
xlabel(‘频率(Hz)’);
ylabel(‘相频特性’);
matlab已知滤波器参数,求频响
最新推荐文章于 2024-07-24 16:45:45 发布