I'm having real trouble trying to create/use a filter in MATLAB which is accurate enough at very low frequencies.
I'm interested in a range of signals between 5 and 50Hz, the high band isn't too much of a concern, what I really want to do is filter anything beneath 5Hz. However, I'm finding the roll off with Butterworth filters is doing very little in terms of filtering, it's just attenuating the signal to about half what the normal signal is.
I've tried two methods. One was using MATLABs filter tool fdatool
and the other was a manual method below:
filtLow = 5;
filtHigh = 50;
Fs = 1000;
[b, a] = butter(1, filtLow/(Fs/2), 'high');
y = filtfilt(b, a, data);
or
[b, a] = butter(1, [filtLow/(Fs/2), filtHigh/(Fs/2)]);
y = filtfilt(b, a, data);
Can anyone give me a suggestion or code which may give me better results?
filtLow = 5; filtHigh = 50; Fs = 1000; [b, a] = butter(1, filtLow/(Fs/2), 'high'); y = filtfilt(b, a, data); OR [b, a] = butter(1, [filtLow/(Fs/2), filtHigh/(Fs/2)]); y = filtfilt(b, a, data);
– ritchie888