개발자 뺚
[Cody]Problem 44947. Find the Oldest Person in a Room 본문
Given two input vectors:
- name - user last names
- age - corresponding age of the person
Return the name of the oldest person in the output variable old_name.
function old_name = find_max_age(name,age)
[value index] = max(age);
old_name = name(index);
end
'Solution > MATLAB' 카테고리의 다른 글
[Cody] Problem 790. Cody Computer Part 5 - Guess the Name of Cody Computer (0) | 2023.10.13 |
---|---|
[Cody] Problem 44946. Solve a System of Linear Equations (0) | 2023.08.23 |
[Cody] Problem 44951. Verify Law of Large Numbers (11) | 2023.08.23 |
[Cody] Problem 44944. Convert from Fahrenheit to Celsius (0) | 2023.08.23 |
[Cody] Problem 128. Sorted highest to lowest? (0) | 2023.08.22 |