datetime.setxor
datetime: C = setxor (A, B)
datetime: C = setxor (A, B, 'rows')
datetime: C = setxor (…, order)
datetime: [C, ixA, ixB] = setxor (…)
Set exclusive-or of two datetime arrays.
C = setxor (A, B) returns the unique datetime
values that are in A or in B but not in both. Either input
may instead be a date/time character vector, string array, or cell array
of character vectors, which is promoted to a datetime array before the
operation. Membership is decided on the absolute instant, so two zoned
inputs may be in different time zones; the result carries the time zone
and display format of A. Distinct NaT elements are all
retained. C is a row vector when both A and B are row
vectors and a column vector otherwise.
C = setxor (A, B, treats each row
of the datetime matrices A and B, which must have the same
number of columns, as a single element and returns the rows that are in
one input but not both.
'rows')
… = setxor (…, order) returns the values in
'sorted' order (the default) or in 'stable' order.
[C, ixA, ixB] = setxor (…) also returns
index vectors ixA and ixB such that C is the combination
of A(ixA) and B(ixB), or the
corresponding row selections when 'rows' is used.
Source Code: datetime