Butterworth filter in MATLAB: zero lag?

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

 Accepted Answer

Jan
Jan on 5 Feb 2018
Edited: Jan on 5 Feb 2018
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.

1 Comment

Oh how did I miss that! Thank you very much for you help.

Sign in to comment.

More Answers (0)

Asked:

on 5 Feb 2018

Commented:

on 5 Feb 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!