setxor
Set exclusive OR of two arrays.
📝Syntax
C = setxor(A, B)
[C, ia, ib] = setxor(A, B)
📥Input Arguments
Parameter Description
A, B Input arrays.
📤Output Arguments
Parameter Description
C Sorted values that are in only one of the input arrays.
ia, ib Index vectors into A and B.
📄Description

setxor(A, B) returns values that occur in A or B, but not both.

💡Examples
A = [5 7 1];
B = [3 1 1];
C = setxor(A, B)
🔗See Also
unionintersectsetdiff
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub