Calculating with missing values?

조회 수: 6 (최근 30일)
Max Behr
Max Behr 2020년 6월 17일
댓글: Max Behr 2020년 6월 17일
Hello,
I got a matrix and one value is missing. I still wan to calculate the standard error of it
>> test=rand(3,3)
test =
0.0975 0.9575 0.9706
0.2785 0.9649 0.9572
0.5469 0.1576 0.4854
>> test(3,1)=missing
test =
0.0975 0.9575 0.9706
0.2785 0.9649 0.9572
NaN 0.1576 0.4854
>> test_SE=std(test)/sqrt(length(test))
test_SE =
NaN 0.2679 0.1595
Why doesn't it work?
And can I let Matlab ignore the missing value?
Thanks.

채택된 답변

KSSV
KSSV 2020년 6월 17일
편집: KSSV 2020년 6월 17일
doc nanstd
Or fill NaN values using fillmissing and use std.
Or have a look here:
  댓글 수: 1
Max Behr
Max Behr 2020년 6월 17일
nanstd works perfect! Thanks :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by