tricky
fist find maximum age then use index of maximum age and by using that find corresponding name
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))
name =
38
43
38
40
49
46
33
40
28
31
45
42
25
39
36
48
32
27
37
50
48
39
41
44
28
25
39
25
36
30
45
40
25
47
44
48
44
35
33
38
39
44
44
37
45
37
30
39
42
42
49
44
43
47
12
38
41
45
36
38
29
28
30
28
29
36
45
32
31
48
25
40
39
41
33
31
35
32
42
48
34
39
28
29
32
39
37
49
31
37
38
45
30
48
48
25
44
49
45
48
old_name =
50
|
2 | Fail |
name = ["Renee" "Melanie" "Katrina" "Ethan"];
age = [23 27 19 13];
maxAge_correct = "Melanie";
assert(isequal(find_max_age(name,age),maxAge_correct))
name =
23 27 19 13
old_name =
27
|
3075 Solvers
Project Euler: Problem 7, Nth prime
521 Solvers
516 Solvers
Longest run of consecutive numbers
1656 Solvers
Who is the smartest MATLAB programmer?
561 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!