%% Symmetric Difference of Vectors Containing NaNs
% Define two vectors containing NaN.

A = [5 NaN NaN]; B = [5 NaN NaN];

%
% Find the symmetric difference of vectors A and B.

C = setxor(A,B)

% The setxor function treats NaN values as distinct.
% Copyright 2012 The MathWorks, Inc.