You can write a custom function to perform the operation of setxor
without using setdiff
. Here's an implementation for tables:
main.m817 chars21 lines
This function first uses the ismember
function to find the rows that are common between A
and B
. Then, it negates the result to find the rows that are not common between A
and B
. Finally, it combines the unique rows from A
and B
to create C
, which is the set with the elements that are in A
or B
, but not in their intersection.
gistlibby LogSnag