clear; clc;

data = [4 9 7 2 -1 6 3];
result = data(1);

% for i = 2 : 7
%     if data(i) > result
%         result = data(i);
%     end
% end
% result

for item = data(2 : end)
   if item > result
       result = item;
   end
end
result