Mean of an Array Containing some NAN Elements
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Fabio Taccaliti
am 7 Jul. 2022
Beantwortet: Vijeta Singh Yadav
am 7 Jul. 2022
Hello, I have two different arrays, A2 (96x96 doubles) and A3 (96x96x96 doubles), in both these arrays some elements inside are NAN.
I would like to compute the mean (single value for each array) of all the non-NAN values, how can I do it?
I tried with mean(A2) and mean(A3) but is not working
0 Kommentare
Weitere Antworten (1)
Vijeta Singh Yadav
am 7 Jul. 2022
M = mean(___,nanflag)
This function will define whether to exclude or include NaN values from the computation of any previous syntaxes.
It has the following 2 types:
- Mean(X,’omitNaN’): It will omit all NaN values from the calculation
- Mean(X,’includeNaN’): It will add all the NaN values in the calculation.
0 Kommentare
Siehe auch
Kategorien
Mehr zu NaNs finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!