dir2.c

来自「DSP algorithm」· C语言 代码 · 共 21 行

C
21
字号
/* dir2.c - IIR filtering in direct form */double dot();void delay();double dir2(M, a, L, b, w, v, x)          /* usage: y = dir2(M, a, L, b, w, v, x); */double *a, *b, *w, *v, x;int M, L;{       v[0] = x;                                 /* current input sample */       w[0] = 0;                                 /* needed for dot(M,a,w) */       w[0] = dot(L, b, v) - dot(M, a, w);       /* current output */       delay(L, v);                              /* update input delay line */       delay(M, w);                              /* update output delay line */       return w[0];}

⌨️ 快捷键说明

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