...设计一个FIR数字低通滤波器,说我14行的 'ideal'没有定义...
发布网友
发布时间:2024-09-25 15:02
我来回答
共1个回答
热心网友
时间:2024-11-10 12:35
function hd = ideal_lp(wc,M)
% Ideal LowPass filter computation
% --------------------------------
% [hd] = ideal_lp(wc,M)
%hd= ideal impulse response between 0 to M-1
%wc= cutoff frequency in radians
% M= length of the ideal filter
%
alpha = (M-1)/2; n = 0:1:(M-1);
m=n- alpha; fc = wc/pi; hd = fc*sinc(fc*m);
end
注:此处的wc=(Wst-Wp)/2