help In NAN problem

1 次查看(过去 30 天)
mutah
mutah 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 CenterFile Exchange 中查找有关 NaNs 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by