Butterworth filter in MATLAB: zero lag?

21 views (last 30 days)
Matilda
Matilda on 5 Feb 2018
Commented: Matilda on 5 Feb 2018
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
Matilda
Matilda on 5 Feb 2018
Oh how did I miss that! Thank you very much for you help.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!