clear;
clc;

data = randi(100, 1, 5)

% (1) Find max of data.
result = data(1);
for x = data(2 : end)
    if x > result
        result = x;
    end
end
disp("MAX = " + result);
max(data)

% (2) Find location of max of data.
idx = 1;
result = data(idx);
for i = 2 : length(data)
    if data(i) > result
        idx = i;
        result = data(i);
    end
end
disp("MAX = " + result);
disp("Location = " + idx);
[a, b] = max(data)





