circular_buffer_fir_filter_in_direct_form.m

来自「DSP訊號處理的原始碼 開發工具為C和Matlab」· M 代码 · 共 17 行

M
17
字号
% cfir2.m - FIR filter using circular delay-line buffer%% [y, w, q] = cfir2(M, h, w, q, x)%% h = order-M filter (row vector)% w = circular filter state (row vector)% q = circular index into w% x = scalar input% y = scalar output% based on cfir2.cfunction [y, w, q] = cfir2(M, h, w, q, x)w(q+1) = x;                                 % read inputy = h * w(rem(q+(0:M), M+1)+1)';            % compute outputq = cdelay2(M, q);                          % update delay

⌨️ 快捷键说明

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