Delay when using lowpass(), medfilt1() and filter()

9 ビュー (過去 30 日間)
Dhanushka Palipana
Dhanushka Palipana 2020 年 5 月 10 日
コメント済み: Star Strider 2020 年 5 月 10 日
Hello,
I'm trying to filter a data signal and I'm using y = lowpass(x,fpass,fs), medfilt(x),filter(b,a,x) for this.
I'm not sure if these functions in matlab introduce a delay to the signal or if they compensate themselves for this delay.
If they are how can I compensate for this delay?

採用された回答

Star Strider
Star Strider 2020 年 5 月 10 日
The filter function introduces phase delay and phase dsitortion in the filtered signal. The filtfilt function does not, so it is best to use filtfilt for most signal processing applications.
The lowpass function (apparently) uses filtfilt rather than filter, because when I have used the second (optional) output of lowpass that returns a digital filter object, I get the same results as the lowpass function with filtfilt although not with filter.
The medfilt1 function does not mention how it filters the data, only that it ‘considers the signal to be 0 beyond the endpoints.
  4 件のコメント
Dhanushka Palipana
Dhanushka Palipana 2020 年 5 月 10 日
Thank you again. Your answer is very helpful.
Star Strider
Star Strider 2020 年 5 月 10 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by