采用窗函数法(Kaiser窗)设计一个FIR数字低通滤波器,说我14行的 ✀ideal✀没有定义。

2025-03-07 09:00:25
推荐回答(1个)
回答1:

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