fft function returns NaN from non-NaN input

16 ビュー (過去 30 日間)
Yuwei Zhu
Yuwei Zhu 2017 年 5 月 2 日
コメント済み: Yuwei Zhu 2017 年 5 月 2 日
Hello, I have a one dimension MATLAB vector as fft input. The plot of the vector looks like this:
Zoom it in:
I used isnan() function checked that there is no NaN in this vector. I thought this vector is totally legal to be used in MATLAB fft function.
What is wired is that when I put this vector into the function, all the returns are NaN.
If you want to try out the vector yourself, I have attached it. just load('fmu_q.mat'), and fft(fmu_q). You will see everything is NaN.
Could anyone shed some light on what happened?

採用された回答

David Goodmanson
David Goodmanson 2017 年 5 月 2 日
編集済み: David Goodmanson 2017 年 5 月 2 日
Hi Yuwei, you did check for NaNs but not for any values that equal +-infinity, and there are three of them:
>> find(isinf(fmu_q))
ans = 2959 2960 2961
  1 件のコメント
Yuwei Zhu
Yuwei Zhu 2017 年 5 月 2 日
Thanks! That is the problem.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by