function y = maximum(x)
%MAXIMUM Largest element in a vector
%  Y = MAXIMUM(X) returns the largest element in X.

% Use a loop to examine each element of x.
% Each time through the loop we set y to the largest value
%  we have seen so far in x.

y = -Inf; 
for index = 1:length(x)
  xi = x(index);
  if xi > y
    y = xi;
  end
end


end
