hbfilt.m
来自「里面囊括了基于matlab滤波器设计的各种.m文件」· M 代码 · 共 18 行
M
18 行
% The design of halp-band filter by using the simple method
% according to the paper "Multirate filters, Filter Banks, Polyphase
% Networks, and Applications: A Tutorial "
% The input parameter N is odd integer. The result h is casual.
function h = hbfilt(N);
n = -(N-1)/2:-1;
neg_h = sin(pi*n/2)./(pi*n);
pos_h = sin(0.5*pi*(-n)*antieye((N-1)/2))./(pi*(-n)*antieye((N-1)/2));
h(1:(N-1)/2) = neg_h;
h((N+3)/2:N) = pos_h;
h((N+1)/2) = 1/2;
% Hamming window weighting, you can specify other form windows
h = h.*hamming(N)';
H = freqz(h,1,1000);
plot((0:999)/1000,dbvalue(abs(H)),'c');
title('Frequency Response of Half-band Filter');
axis([0,1,-100,10]);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?