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

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

%
% Find the set difference of A and B.

C = setdiff(A,B)

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