MATLAB: Butterworth filter in MATLAB: zero lag

bidirectionalbutterworth filter

I am wondering if MATLAB uses a bidirectional filter (zero lag) for butterworth lowpass filtering?

Best Answer

fc = 300;
fs = 1000;
[b,a] = butter(6,fc/(fs/2), 'low');
yy = filtfilt(b, a, y)
If you ask an internet search engine for "MATLAB uses a bidirectional filter zero lag", the docs of filtfilt are the 2nd match after your own question. See also doc butter.
Related Question