www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/PreserveLegacyBehaviorofsetxorExample.m
%% Preserve Legacy Behavior of setxor % Use the |'legacy'| flag to preserve the behavior of |setxor| from R2012b % and prior releases in your code. %% % Find the symmetric difference of |A| and |B| with the current behavior. A = [5 1 3 3 3]; B = [4 1 2 2]; [C1,ia1,ib1] = setxor(A,B) %% % Find the symmetric difference and preserve the legacy behavior. [C2,ia2,ib2] = setxor(A,B,'legacy')