why filtering gives nan values.

16 ビュー (過去 30 日間)
Ede gerlderlands
Ede gerlderlands 2013 年 4 月 4 日
Am applying low pass filter to my signal data using
[b11,a11] = butter(5,4/24);
MM1= filtfilt(b11,a11,MM1);
but the result comes out nan. I don't have any nans in my MM1 data . Any help?

採用された回答

Youssef  Khmou
Youssef Khmou 2013 年 4 月 5 日
hi,
I think the input has a NaN, look at this example :
r=rand(100,1);
[b11,a11] = butter(5,4/24);
MM1= filtfilt(b11,a11,r); % Normal Filtering
r(end/2)=NaN; % FOR example a middle value to be NaN
MM2= filtfilt(b11,a11,r);
MM2 is vector of NaNs, only one NaN value in r produces NaNs in the output .
try :
isnan(MM1)
  4 件のコメント
Honglei Chen
Honglei Chen 2013 年 4 月 5 日
@Ede, do you have things like inf in your data?
Ede gerlderlands
Ede gerlderlands 2013 年 4 月 5 日
Thanks for your support

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFilter Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by