is(:,1) = X(:,1)==3;
is(:,2) = X(:,2)==8;
is(:,3) = isnan( X(:,3));
all( is, 2 )
AFAIK: isnan is the only way to spot NaN.
I don't think there is a magic one-liner. A little function along the example above is one way. Loop over all columns, ....