What exactly is stored in the buffer array in the FIR Filter code below? Is it the values of x[n-k] or something else?
float filter (float value){
for (int i = ntaps-1; i>0; i--){
buffer[i] = buffer[i-1];
}
buffer[0] = value;
for (int i = 0; i output += buffer[i]*h[i];
}
return ouput;
}
Answer
It stores the last $ntap$ samples of the input. So it's $x[n], x[n-1], ..., x[n-N+1]$
No comments:
Post a Comment