FUNCTION REFERENCE
NaT
Not-a-Time: a missing datetime.
Not-a-Time: a missing datetime.
Syntax
t = NaTSyntax
t = NaT(n)Syntax
t = NaT(r, c)NaT compares unequal to everything, itself included; isnat finds it. sort
puts it last (first with 'descend'), issorted(t, 'ascend' or 'descend')
uses the same order, min and max skip it unless 'includenat' is given, and
mean returns NaT unless 'omitnat' is given. string(NaT) is a missing
string (<missing>); char and cellstr give the text 'NaT'.
Example
t = NaT % NaTExample
tf = isnat([datetime(2024, 1, 1), NaT]) % 0 1Differences from MATLAB: Arrays are 2-D only.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.