%% Determine If Array Elements are NaT
% Create a datetime array from numeric values containing NaN.

d = datetime(2014,[1 2 NaN 4],1)

%
% Determine if any elements of d are NaT (Not-a-Time).

isnat(d)

% Copyright 2012 The MathWorks, Inc.