interval.max function

calcula maximos