notch.m

来自「It is the code to demonstrate actof filt」· M 代码 · 共 12 行

M
12
字号
%2瞒 IIR notch filter 拌荐 备窍扁
%[bi,ai]=notch(band,notch_frequency,sampling)


function[bi,ai]=notch(band,notch_frequency,sampling)
fs=sampling;             % sampling freq.
fo=notch_frequency/(fs/2);      % notch center freq.
df=band;                % notch bandwidth
r=1-(pi/2)*(df/(fs/2));
bi=[ 1,  -2*cos(fo*pi),  1];
ai=[ 1,  -2*r*cos(fo*pi),  r^2 ];

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?