Error using nanstd function
이전 댓글 표시
B=nanstd(X,0,'all');
when using the above statement in Matlab R2019a there are no problems, however when using it on another computer with R2017a, i get the error:
Error using size
Dimension argument must be a positive integer scalar within indexing range.
Error in var (line 109)
n = size(x,dim);
Error in nanvar (line 32)
y = var(varargin{:},'omitnan');
Error in nanstd (line 28)
y = sqrt(nanvar(varargin{:}));
채택된 답변
추가 답변 (1개)
Steven Lord
2019년 12월 17일
0 개 추천
The ability to specify 'all' as a dimension in the var function (which the nanstd function calls) was introduced in release R2018b.
댓글 수: 2
Adam Evenoff
2019년 12월 17일
Steven Lord
2019년 12월 17일
M = magic(5);
M(3, 3) = NaN;
std(M(:), 'omitnan')
카테고리
도움말 센터 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!