Problem 57570. An array is given that contains the marks. Find out the highest 3 marks
An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks received by the students?
For example if x=[12 5 12.5 10 13 14 8]
Output will be y=[14 13 12.5]
Solution Stats
Problem Comments
-
1 Comment
Christian Schröder
on 18 Jan 2023
Note that this is asking for the highest three DISTINCT marks received by the students --- not the marks received by three highest-ranking students.
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
All your base are belong to us
553 Solvers
-
Test if two numbers have the same digits
247 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
383 Solvers
-
240 Solvers
-
An array is given. Find the unique elements of the array. [keep the sequence unchanged]
50 Solvers
More from this Author8
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!