Cody

Solution 2462582

Submitted on 3 Jun 2020
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   Fail
load patients.mat Age(55) = 12; name = string(LastName); maxAge_correct = "Robinson"; assert(isequal(find_max_age(name,Age),maxAge_correct))

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

Unrecognized function or variable 'max'. Error in find_max_age (line 4) [max,idx]=max(age) Error in Test1 (line 5) assert(isequal(find_max_age(name,Age),maxAge_correct))

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

t = 1x2 table <strong>name</strong> <strong>age</strong> <strong>____________________________________________</strong> <strong>____________________</strong> "Renee" "Melanie" "Katrina" "Ethan" 23 27 19 13

Unrecognized function or variable 'max'. Error in find_max_age (line 4) [max,idx]=max(age) Error in Test2 (line 4) assert(isequal(find_max_age(name,age),maxAge_correct))

Suggested Problems

More from this Author13