Products & Services Industries Academia Support User Community Company

Learn more about Statistics Toolbox   

setxor - Class: categorical

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS