how i can calculate the average of the top numbers

2 次查看(过去 30 天)
i have 20 numbers , i need to calculate the average of the top 8 scores , how i can do it using matlab

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-11-30
If A is your vector
b=sort(A,'descend')
out=mean(b(1:8))
  4 个评论
Image Analyst
Image Analyst 2013-11-30
You can find sorting routines on the internet, for example wikipedia. You can program that up yourself - I don't think you need us for that.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by