Low pass filter returns NAN
2 ビュー (過去 30 日間)
古いコメントを表示
hi, I'm trying to use a Low pass filter for my signal data. I have following code for the same
CutF = 25
step = 0.001
fNorm=CutF/(1/(2*step));
[b,a]=butter(10,fNorm,'low');
C1=filtfilt(b,a,Data(:,(i-1)*6+1));
Now this works for some of my data set but for some it returns NAN. I cant figure out why it works in some case and not in others.
thanks in advance
2 件のコメント
the cyclist
2012 年 6 月 25 日
Would it be possible for you to include a very small example of "Data" that will allow us to run your code, and exhibits the problem?
採用された回答
Jan
2012 年 6 月 26 日
The algorithms of filter and filtfilt do not contain magic sources of NaNs. I'd be very surprised, if the NaNs do not exist in the inputs already, or at least Infs. Test this:
all(isfinite(Data(:))
1 件のコメント
Cameron
2013 年 3 月 3 日
You are not the only one with this problem see link below
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Multirate Signal Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!