%% Intersection of Vectors Containing NaNs
% Create two vectors containing NaN.

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

%
% Find the values common to both A and B.

C = intersect(A,B)

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