%% Number of Elements in Table
% Create a table with four variables listing patient information for five people.

LastName = {'Smith';'Johnson';'Williams';'Jones';'Brown'};
Age = [38;43;38;40;49];
Height = [71;69;64;67;64];
Weight = [176;163;131;133;119];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];

A = table(Age,Height,Weight,BloodPressure,'RowNames',LastName)

%
% Find the number of elements in the table.

n = numel(A)

% numel returns a value equivalent to prod(size(A)) corresponding to the 5 rows and 4 variables.
% Copyright 2012 The MathWorks, Inc.