Problem 44947. Find the Oldest Person in a Room
Solution Stats
Problem Comments

15 Comments
In the first test suite, Robinson and Reed both have the same age, so I think either the test suite should be improved or Reed's age in the .mat file should be changed.
Tricky question though
Good one
Interesting
rh x = I don't think you need the [] in your max matrix.
Good job.
where I can get the standard answer?
Easy staff. Don't think too much. First find the maximum age, then use the index of the maximum age and by using that you'll find the corresponding name.
Good problem
idk adam
a challenging problem
Good question
not bad
I solved the problem in MATLAB but on here it did not work. I found the index of the maximum number in the variable age, and then used that to output a name with the same index in the name variable.
not that hard
Solution Comments

1 Comment
I am puzzled as to why this solution is flagged.

1 Comment
So what this does is it finds the number where age is equal to the max age, and then that corresponding number gives the position of names that has the max name.

1 Comment
nice question

1 Comment
simple

1 Comment
Improved the code to deal with multiple people with the same oldest age

1 Comment
great

1 Comment
This is a good question.

1 Comment
simple indexing problem

1 Comment
Tough problem

1 Comment
its good

1 Comment
Keep in mind you have to obtain the position for the older person. This was taught in the max(var) class. Good luck!

2 Comments
tricky
fist find maximum age then use index of maximum age and by using that find corresponding name

1 Comment
good one.

1 Comment
Even typing only "Old_name = 2" resuts in size to be 13. What logic and language did you apply for getting size 8?
Problem Recent Solvers12393
Suggested Problems

1349 Solvers

335 Solvers

Rounding off numbers to n decimals
2926 Solvers

531 Solvers

(Linear) Recurrence Equations  Generalised Fibonaccilike sequences
251 Solvers
More from this Author13
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!