Cody

# Problem 44947. Find the Oldest Person in a Room

Solution 2962951

Submitted on 18 Sep 2020 by 宇钦 叶
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
load patients.mat Age(55) = 12; name = string(LastName); maxAge_correct = "Robinson"; assert(isequal(find_max_age(name,Age),maxAge_correct))

old = 1×2 string array "0" "0" old = 1×2 string array "38" "Smith" old = 1×2 string array "43" "Johnson" old = 1×2 string array "49" "Brown" old = 1×2 string array "50" "Robinson" old_name = "Robinson"

2   Pass
name = ["Renee" "Melanie" "Katrina" "Ethan"]; age = [23 27 19 13]; maxAge_correct = "Melanie"; assert(isequal(find_max_age(name,age),maxAge_correct))

old = 1×2 string array "0" "0" old = 1×2 string array "23" "Renee" old = 1×2 string array "27" "Melanie" old_name = "Melanie"

### Community Treasure Hunt

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

Start Hunting!