Set exclusive-or for categorical arrays
Syntax
C = setxor(A,B)
[C,IA,IB] = setxor(A,B)
Description
C = setxor(A,B) when A and B are
categorical arrays returns a categorical vector C containing
the values not in the intersection of A and B.
The result C is sorted. The set of categorical
levels for C is the sorted union of the sets of
levels of the inputs, as determined by their labels.
[C,IA,IB] = setxor(A,B) also returns index
vectors IA and IB such that C is
a sorted combination of the elements A(IA) and B(IB).
See Also
intersect, ismember, setdiff, union, unique
 | setlabels (categorical) | | SharedCov property (gmdistribution) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit