void FIfConvol (const float x, float y, int Nout, const float h,
Filter a signal with an FIR filter
The procedure convolves a set of filter coefficients with an array of data.
The input array is x[.]. The first lmem = Ncof-1 samples of x[.] are past
inputs. The first output point is calculated with filter coefficient h
aligned with x[lmem]. The last output point is calculated with h aligned
The output array can share storage with the input array, with the output data
overlaying the input data. Consider an array x with lmem+Nout elements.
The first lmem elements are past input samples; the next Nout values are new
input samples. To share input/output storage, invoke this routine as
FIconvol (x, x, Nout, h, Ncof)
On return, the first Nout elements of x are the output values. The last
lmem elements are the past input values needed for the next invocation of
-> const float x
Input array of data. Let lmem=Ncof-1. The first output point point is
calculated as follows
y = h*x[lmem] + h*x[lmem-1] + h*x[lmem-2] + ...
The array x must have lmem+((Nout-1))+1 elements.
<- float y
Output array of samples. The order of operations is such that this array
can share storage with the array x.
-> int Nout
Number of output samples to be calculated
-> const float h
Array of Ncof filter coefficients
-> int Ncof
Number of filter coefficients
Author / revision
/ Revision 1.14 2005/02/01
Main Index libtsp