%% Round Duration Values Toward Positive Infinity
% Round each value in a duration array to the nearest number of seconds greater than or equal to that value.

t = hours(8) + minutes(29:31) + seconds(1.23);
t.Format = 'hh:mm:ss.SS'

%

Y1 = ceil(t)

%
% Round each value in t to the nearest number of hours greater than or equal to that value.

Y2 = ceil(t,'hours')

% Copyright 2015 The MathWorks, Inc.