//--------------------------------------------------------------------------- #include #include #pragma hdrstop //--------------------------------------------------------------------------- #pragma argsused #define SIZE 20 #define SAMPLE 5 void filter(double *pCoeffs, double *pIn, double *pOut); int main(int argc, char* argv[]) { int i; double a[SIZE] = { 0.01012540679169, 0.01619011662008, 0.009786728378426, -0.01728521320085, -0.05341272232682, -0.06686228261234, -0.02501874309413, 0.07695974701189, 0.2020233515395, 0.2882283854912, 0.2882283854912, 0.2020233515395, 0.07695974701189, -0.02501874309413, -0.06686228261234, -0.05341272232682, -0.01728521320085, 0.009786728378426, 0.01619011662008, 0.01012540679169 }; double sample[SAMPLE] = { 2, 2, 2, 2, 2 }; double out[SAMPLE]; filter(a, sample, out); for (i=0; i0; j--) Delay[j] = Delay[j-1]; Delay[0] = pIn[i]; for (j=0; j