Page 1 of 1

Bug in FIRFilter ?

Posted: 03 Dec 2010, 07:26
by M_Spueler
Just wanted to know if this is a bug in FIRFilter or only a problem with my setup. I generated Filter coefficients with matlab and the output of FIRFilter looks completly different than i expect it to be.

changing following line

Code: Select all

result[sample] = inner_product( &mFilter[channel][0], &mFilter[channel][filterLength-1], &mBuffer[channel][sample], 0 );
to

Code: Select all

result[sample] = inner_product( &mFilter[channel][0], &mFilter[channel][filterLength-1], &mBuffer[channel][sample], 0.0);
solved the problem. Seems like there is some internal int casting going on due to the 0

Posted: 03 Dec 2010, 09:16
by mellinger
Thanks a lot for reporting this bug.
It was fixed in BCI2000 v3, but still present in v2.1.

--Juergen