Extract values from a matrix
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Patrick Chow
am 15 Nov. 2019
Beantwortet: Guillaume
am 15 Nov. 2019
let say I have a matrix:
[ 3 2 4 ; 3 5 1]
I want to extract all the values that are greater than 3 and use all these extracted values to find the mean value.
How should I approach this?
0 Kommentare
Akzeptierte Antwort
Guillaume
am 15 Nov. 2019
mean(yourmatrix(yourmatrix >= 3)) %mean of all values greater than or equal to 3
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!