%% Determine if Array Contains Duration Values
% Determine if the output of an arithmetic calculation is a duration array.
% Subtract a datetime array from another.

t1 = datetime(2014,03,16:17);
t2 = datetime(2014,03,20);
dt = t2 - t1

%
% Determine if the output is a duration array.

tf = isduration(dt)

% Copyright 2015 The MathWorks, Inc.