Created
November 12, 2019 16:47
-
-
Save schluppeck/49eb430ab6ea6e19ebce4f9856ff8803 to your computer and use it in GitHub Desktop.
in matlab class solution to cody problem https://www.mathworks.com/matlabcentral/cody/problems/9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function b = most_change(a) | |
% most_change - calculate who is richest | |
% | |
% ds 2019-11-12, cody problem #9 | |
money = a .* [0.25 0.1 0.05 0.01]; | |
total_money = sum(money, 2); | |
[m, b] = max(total_money); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment