sum of an array
显示 更早的评论
How do I get the sum of an array which contains some NaN. I am getting some error like this:
sum(a,'omitNaN')
??? Error using ==> sum
Trailing string input must be 'double' or 'native'.
a = Columns 1 through 5
NaN 664.7000 663.2000 662.2000 NaN
Columns 6 through 10
688.4000 688.4000 NaN NaN NaN
Columns 11 through 15
NaN NaN NaN NaN NaN
Columns 16 through 20
NaN NaN 731.4000 723.0000 704.8000
Also, when I am calculating mean and standard deviation, do i have to include NaN or omit it?
Thank you,
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!