Cody

# Problem 44947. Find the Oldest Person in a Room

Solution 2057539

Submitted on 14 Dec 2019 by Alistair James
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))

HowOld = 50 idx = 20 Oldest = "Robinson" old_name = "Robinson" Status = Figure (Msgbox_ ) with properties: Number: [] Name: ' ' Color: [0.9400 0.9400 0.9400] Position: [402.4800 540.5867 347.0400 54.8533] Units: 'points' Show all properties Status = Figure (Msgbox_ ) with properties: Number: [] Name: ' ' Color: [0.9400 0.9400 0.9400] Position: [402.4800 540.5867 347.0400 54.8533] Units: 'points' Show all properties

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

HowOld = 27 idx = 2 Oldest = "Melanie" old_name = "Melanie" Status = Figure (Msgbox_ ) with properties: Number: [] Name: ' ' Color: [0.9400 0.9400 0.9400] Position: [408.8000 540.5867 334.4000 53.1200] Units: 'points' Show all properties Status = Figure (Msgbox_ ) with properties: Number: [] Name: ' ' Color: [0.9400 0.9400 0.9400] Position: [408.8000 540.5867 334.4000 53.1200] Units: 'points' Show all properties