I run both of these filter functions in Matlab and Python respectively. The results are not consistent. Is lfilter the right function to replace filter from Matlab?
Matlab:
y = filter(b,a,y,zi*y(1));
Python:
y = lfilter(b,a,y,axis=0,zi = zi * y[0][0])
In the documentation, sosfilter is suggested. Is this a better function?
I read the docs and compared the notes on the functions which both seem to implement
a[0]*y[n] = b[0]*x[n] + b[1]*x[n-1] + … + b[M]*x[n-M]
– a[1]*y[n-1] – … – a[N]*y[n-N]