I'm trying to implement the Butterworth filter as a high pass filter inside a function, where every time stip a measurement will be passed (inside this function I do have buffers for storing the data).
However, I'm using the Matlab built-in function butter to calculate the coefficient. The problem is the filtered signal starts to diverge.
I can tell that this diverge comes because of the discretization but is there any way to solve this issue without high complexity?