%% Table with Missing Elements
% Create a table with four variables listing patient information for five people.  The Weight variable contains missing values.

LastName = {'Sweet';'Jacobson';'Wang';'Joiner';'Berger'};
Age = [38;43;38;40;49];
Height = [71;69;64;67;64];
Weight = [176;NaN;131;133;NaN];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];
tblA = table(Age,Height,Weight,BloodPressure,'RowNames',LastName)

% Sort the rows of the table in ascending order by Weight, placing the rows containing NaN first.

tblB = sortrows(tblA,'Weight','MissingPlacement','first')

%
% Copyright 2012 The MathWorks, Inc.