When using dot indexing, you must specify a single variable to access. For a single
variable name, use T.var. For a single variable index, specified as a positive integer, use
T.(varindex).Create Table from Subset of Larger Table
This example shows how to create a table from a subset of a larger table.Load Sample DataLoad the sample patients data and create a table. Use the unique identifiers in LastName
as row names.load patientspatients = table(Age,Gender,Height,Weight,Smoker,...
'RowNames',LastName);The table, patients, contains 100 rows and 5 variables.View the data type, description, units, and other descriptive statistics for each variable by
using summary to summarize the table.summary(patients)Variables:Age: 100x1 doubleValues:Min 25
Median 39
Max 50Gender: 100x1 cell array of character vectorsHeight: 100x1 doubleValues:Min 60
Median 67
Max 729 Tables