Missing NaN functions?

조회 수: 4 (최근 30일)
Cameron
Cameron 2011년 6월 20일
When I type >>help nansum in the command window, matlab returns "nansum not found." even though the function does exist in the documentation for the R2011a version. Is it possible that these functions (i.e. nansum, nanmean etc.) didn't install correctly, were they not included in R2011a, or do they exist under a new name? Thanks!
  댓글 수: 1
Yella
Yella 2011년 6월 20일
I use matlab 2010a... i have those functions.... FYKI

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 20일
nansum is part of the optional Stats toolbox, and also the optional Finance toolbox, but not part of basic MATLAB.
There is a MATLAB File Exchange contribution that implements at least some of these; please see the contribution http://www.mathworks.com/matlabcentral/fileexchange/6837-nan-suite/

추가 답변 (1개)

Andrei Bobrov
Andrei Bobrov 2011년 6월 20일
so nansum
Xnan20 = X;
Xnan20(isnan(X))=0;
out = sum(Xnan20);

제품

Community Treasure Hunt

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

Start Hunting!

Translated by