1 N-1 -i H(z) = ---- , where C(z) = SUM h[i] z . C(z) i=0
The output is calculated as
h*y[k] = x[k] - h*y[k-1] - h*y[k-2] - ... - h[Ncof-1]*y[k-Ncof+1].Normally, the first coefficient is unity, i.e. h=1. A non-unity value will result in a gain scaling of the response.
The output array y[.] must be primed with mem=Ncof-1 previous output values. On return the top mem values in y[.] can serve as the memory values for the next invocation of this routine.
This routine can also be called with a single array x[.] of length mem+Nout,
FIdFiltAP (&x[mem], x, Nout, h, Ncof)Before entering this routine, the first mem values of x[.] are set to previous output values, while the next Nout values are new input values. On return, the Nout new output values replace the input values, starting at x[mem]. If the top mem elements are shifted down to the bottom of the array, these can serve as the previous output values for the next call to this routine.