help In NAN problem

3 次查看(过去 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

Community Treasure Hunt

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

Start Hunting!

Translated by