help In NAN problem

Hi
MY code generate 1000000 samples
and when i want to sum this samples
it give me NAN
what the problem ??

回答(1 个)

Anything + NaN yields NaN. Use nansum() to sum ignoring nans.
doc nansum

类别

帮助中心File Exchange 中查找有关 NaNs 的更多信息

提问:

2013-11-19

Community Treasure Hunt

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

Start Hunting!

Translated by