Calculating with missing values?

2 Ansichten (letzte 30 Tage)
Max Behr
Max Behr am 17 Jun. 2020
Kommentiert: Max Behr am 17 Jun. 2020
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.

Akzeptierte Antwort

KSSV
KSSV am 17 Jun. 2020
Bearbeitet: KSSV am 17 Jun. 2020
doc nanstd
Or fill NaN values using fillmissing and use std.
Or have a look here:

Weitere Antworten (0)

Kategorien

Mehr zu Testing Frameworks finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by