function theMax = maximum(v)
% maxium(v): Determine the maximum value held in vector v.

% Written by Paul Chew for CS100M, Feb 2006

if length(v) == 0
    error('Cannot find maximum of empty vector')
end
theMax = v(1);
for k = 2:length(v)
	theMax = max(theMax, v(k));
end
