Determine NaT (Not-a-Time) elements
tf = isnat(A)
example
tf = isnat(A) returns an array the same size as the datetime array, A, containing logical 1 (true) where the elements of A are Not-a-Time (NaTs) and logical 0 (false) where they are not. NaT represents a datetime that is undefined.
A
true
NaT
false
collapse all
Create a datetime array from numeric values containing NaN.
NaN
d = datetime(2014,[1 2 NaN 4],1)
d = 1x4 datetime 01-Jan-2014 01-Feb-2014 NaT 01-Apr-2014
Determine if any elements of d are NaT (Not-a-Time).
d
isnat(d)
ans = 1x4 logical array 0 0 1 0
Input array, specified as a datetime array.
This function fully supports tall arrays. For more information, see Tall Arrays.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
isfinite | isinf
isfinite
isinf
You have a modified version of this example. Do you want to open this example with your edits?