/******************************************************************** * iir1.c - Function for IIR filtering using direct-form I structure ********************************************************************/ float iir1(x,y,b,nb,a,na) float *x, *y; // x is input vector, y is output vector float *b, *a; // numerator and denominator coefficients int nb, na; // length of coefficient vectors { float yn = 0.0; // output of IIR filter, y(n) float yn1 = 0.0; // temporary storage for feedforward section float yn2 = 0.0; // temporary storage for feedback section int i,j; // loop index for (i=0; i