Cody

Problem 44947. Find the Oldest Person in a Room

Solution 2407479

Submitted on 28 May 2020 by Victor Quezada
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))

B = 100x2 table <strong>Var1</strong> <strong>Var2</strong> <strong>____</strong> <strong>____________</strong> "12" "Reed" "25" "Alexander" "25" "Hall" "25" "Hill" "25" "Jackson" "25" "James" "25" "Young" "27" "Garcia" "28" "Cooper" "28" "Cox" "28" "Jenkins" "28" "Moore" "28" "Walker" "29" "Howard" "29" "Perry" "29" "Rivera" "30" "Foster" "30" "King" "30" "Parker" "30" "Richardson" "31" "Flores" "31" "Gray" "31" "Price" "31" "Taylor" "32" "Peterson" "32" "Powell" "32" "Thompson" "32" "Wood" "33" "Miller" "33" "Nelson" "33" "Sanders" "34" "Henderson" "35" "Bennett" "35" "Gonzalez" "36" "Harris" "36" "Hernandez" "36" "Murphy" "36" "Ward" "37" "Campbell" "37" "Martinez" "37" "Patterson" "37" "Turner" "37" "Washington" "38" "Bailey" "38" "Butler" "38" "Carter" "38" "Cook" "38" "Smith" "38" "Williams" "39" "Allen" "39" "Brooks" "39" "Coleman" "39" "Evans" "39" "Long" "39" "Mitchell" "39" "Rodriguez" "39" "White" "40" "Jones" "40" "Lopez" "40" "Watson" "40" "Wilson" "41" "Kelly" "41" "Lewis" "41" "Morgan" "42" "Barnes" "42" "Collins" "42" "Edwards" "42" "Thomas" "43" "Johnson" "43" "Morris" "44" "Baker" "44" "Green" "44" "Lee" "44" "Perez" "44" "Roberts" "44" "Russell" "44" "Sanchez" "45" "Anderson" "45" "Bell" "45" "Diaz" "45" "Phillips" "45" "Simmons" "45" "Torres" "45" "Wright" "46" "Davis" "47" "Rogers" "47" "Scott" "48" "Adams" "48" "Bryant" "48" "Clark" "48" "Gonzales" "48" "Hayes" "48" "Martin" "48" "Ramirez" "48" "Ross" "49" "Brown" "49" "Griffin" "49" "Hughes" "49" "Stewart" "50" "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))

B = 4x2 table <strong>Var1</strong> <strong>Var2</strong> <strong>____</strong> <strong>_________</strong> "13" "Ethan" "19" "Katrina" "23" "Renee" "27" "Melanie"

Suggested Problems

More from this Author13

Community Treasure Hunt

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

Start Hunting!