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
0 个评论
采纳的回答
Azzi Abdelmalek
2013-11-30
If A is your vector
b=sort(A,'descend')
out=mean(b(1:8))
4 个评论
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 Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!