how i can calculate the average of the top numbers
10 views (last 30 days)
Show older comments
mohammed
on 30 Nov 2013
Commented: Image Analyst
on 30 Nov 2013
i have 20 numbers , i need to calculate the average of the top 8 scores , how i can do it using matlab
0 Comments
Accepted Answer
Azzi Abdelmalek
on 30 Nov 2013
If A is your vector
b=sort(A,'descend')
out=mean(b(1:8))
4 Comments
Image Analyst
on 30 Nov 2013
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.
More Answers (0)
See Also
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!