I’ve been tasked with recoding a MATLAB script into C or C++, and I’m having a little difficulty wrapping my head around this filter function (filter(a, b, x)). Does anyone know of a simple way to do this, or an existing C library that accomplishes the same thing?
Thanks!
Just implement the filter function as described here. This resembles just a tapped delay-line filter, where
bandaare coefficients andxis the input data:You only have to take care about not-yet-existing indices, which are denoted by the square brackets.
aandbare vectors of lengthN.