This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DSP Library

Hi,

I have an issue with DSP Library fir() function. This function computes a Finite Impulse Response filter on an input array. It takes as input arguments the input data, and an array with the filter coefficients. Here are the input arguments that I am supplying:

DATA x[NX] ={ 10, -20, 10, -30, 10, 40, 25, -10, 10, -20, 10, -30, 10, 40, 25,  -10 }; // Input data

DATA h[NH] ={ -5, 100,200, -50 }; // Filter Coefficients

DATA r[NX];

fir(x, h, r, dbptr, 16, 4);

The problem I am having is that after I execute the fir() function, array r is all 0s, i.e. r[0] = 0, r[1] = 0, ... r[15] = 0.

Can anyone explain why this is so? Is it a fault in the code, or is it normal?

Thanks in advance.

Simon