help In NAN problem

1 回表示 (過去 30 日間)
mutah
mutah 2013 年 11 月 19 日
回答済み: Sean de Wolski 2013 年 11 月 19 日
Hi
MY code generate 1000000 samples
and when i want to sum this samples
it give me NAN
what the problem ??

回答 (1 件)

Sean de Wolski
Sean de Wolski 2013 年 11 月 19 日
Anything + NaN yields NaN. Use nansum() to sum ignoring nans.
doc nansum

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by