function [result1, result2] = myMax(data)

loc = 1;
for i = 2 : length(data)
    if data(i) > data(loc)
        loc = i;
    end
end
result1 = data(loc);
result2 = loc;