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!