Set intersection for categorical arrays
Syntax
C = intersect(A,B)
Description
C = intersect(A,B) when A and B are
categorical arrays returns a categorical vector C containing
the values common to both 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] = UNION(A,B) also returns index
vectors IA and IB such that C
= A(IA) and C = B(IB).
See Also
ismember, setdiff, setxor, union, unique
 | interactionplot | | invpred |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit