Access and modify table metadata properties
A table, T, has properties that store metadata
such as its variable names, row names, descriptions, and variable
units. T.Properties returns a summary of all of
the table properties.
You can access a property using ,
where T.Properties.PropNameT is the name of the table and PropName is
one of the table properties. For example, to access the VariableDescriptions property
of a table named Patients, use Patients.Properties.VariableDescriptions.
You can modify a property value using where T.Properties.PropName = PT is
the name of the table, PropName is one
of the table properties, and P is the desired
property value. For example, to modify the VariableUnits property
of a table named Patients, use Patients.Properties.VariableUnits
= where PP is
a cell array of character vectors containing the specified information.
In contrast, you can access and modify variables within a table
using or T.VarName,
where T.VarName = VT is the name of the table, VarName is
the name of the variable you want to access or modify, and V is
the variable value you want.