Skip to content

Instantly share code, notes, and snippets.

@schluppeck
Created November 12, 2019 16:47
Show Gist options
  • Save schluppeck/49eb430ab6ea6e19ebce4f9856ff8803 to your computer and use it in GitHub Desktop.
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
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