%!demo
%! ## `addprop` attaches your own metadata to a table.  Each property is declared
%! ## with a *scope*: a `'table'`-scoped property holds a single value for the whole
%! ## table, while a `'variable'`-scoped property holds one value per variable,
%! ## aligned with the table's columns.
%!
%! Age = [38; 43; 40];
%! Height = duration (0, 0, 0) + hours ([1.9; 1.8; 1.7]);
%! Gender = categorical ({'M'; 'F'; 'M'});
%! T = table (Age, Height, Gender)
%! T = addprop (T, {'DataSource', 'Instrument'}, {'table', 'variable'});
%!
%! ## The table-scoped `DataSource` takes one value; the variable-scoped
%! ## `Instrument` takes a cell with one entry per variable (Age, Height, Gender).
%! T.Properties.CustomProperties.DataSource = 'Clinic A';
%! T.Properties.CustomProperties.Instrument = {'form', 'stadiometer', 'form'};
%! T.Properties.CustomProperties
%!
%! ## Because it is variable-scoped, `Instrument` follows column operations — after
%! ## removing `Height` its entry drops out too, staying aligned with the columns.
%! T2 = removevars (T, 'Height');
%! T2.Properties.CustomProperties.Instrument
