%% Missing Values in Table with Various Data Types
% Create a table with variables of different data types and find the elements with missing values.

dblVar = [NaN;3;5;7;9;11;13];
singleVar = single([1;NaN;5;7;9;11;13]);
cellstrVar = {'one';'three';'';'seven';'nine';'eleven';'thirteen'};
charVar = ['A';'C';'E';' ';'I';'J';'L'];
categoryVar = categorical({'red';'yellow';'blue';'violet';'';'ultraviolet';'orange'});
dateVar = [datetime(2015,1:2:10,15) NaT datetime(2015,11,15)]';
stringVar = ["a";"b";"c";"d";"e";"f";missing];

A = table(dblVar,singleVar,cellstrVar,charVar,categoryVar,dateVar,stringVar)

%
% ismissing returns 1 where the corresponding element in A has a missing value.

TF = ismissing(A)

% The size of TF is the same as the size of A.
% Copyright 2012 The MathWorks, Inc.