MATLAB Function Reference Previous page   Next Page
setxor

Find set exclusive OR of two vectors

Syntax

Description

c = setxor(A, B) returns the values that are not in the intersection of A and B. The resulting vector is sorted. A and B can be cell arrays of strings.

c = setxor(A, B, 'rows'), when A and B are matrices with the same number of columns, returns the rows that are not in the intersection of A and B.

[c, ia, ib] = setxor(...) also returns index vectors ia and ib such that c is a sorted combination of the elements c = a(ia) and c = b(ib) or, for row combinations, c = a(ia,:) and c = b(ib,:).

Examples

See Also

intersect, ismember, issorted, setdiff, union, unique


Previous page  set (timer) shading Next page

© 1994-2005 The MathWorks, Inc.