fir2.c

来自「包含有各种各样的数字信号处理经典算法源代码,很有用的.」· C语言 代码 · 共 20 行

C
20
字号
/* fir2.c - FIR filter in direct form */double dot();void delay();double fir2(M, h, w, x)                       /* Usage: y = fir2(M, h, w, x); */double *h, *w, x;                             /* \(h\) = filter, \(w\) = state, \(x\) = input */int M;                                        /* \(M\) = filter order */{                               double y;       w[0] = x;                              /* read input */       y = dot(M, h, w);                      /* compute output */       delay(M, w);                           /* update states */       return y;}

⌨️ 快捷键说明

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