Finding the mean value for five maximum number in matrix
Ältere Kommentare anzeigen
Hi guys, I have (1*9) matrix below, I 'd like to calculate mean value for max 5 number in this matrix can anyone help me?
Regards

Akzeptierte Antwort
Weitere Antworten (1)
Chad Greene
am 20 Jan. 2015
Bearbeitet: Chad Greene
am 20 Jan. 2015
X_sorted = sort(X);
mean5 = mean(X_sorted(1:5),'descend');
Kategorien
Mehr zu Bartlett finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!