%% Remove Custom Properties
% Add properties that contain custom metadata to a table. Then remove some of the properties.
% First, read measurements of humidity and air quality into a table. Display the first three rows.

T = readtable('indoors.csv');
head(T,3)

%
% Add properties for custom metadata using the addprop function. Then assign metadata to those properties.

T = addprop(T,{'Instrument','Precision','SourceFile'},{'variable','variable','table'});
T.Properties.CustomProperties.Instrument = ["clock" "hygrometer" "air quality meter"];
T.Properties.CustomProperties.Precision = [NaN 0.5 0.1];
T.Properties

%
% To remove properties, use the rmprop function. The only properties that you can remove are the custom properties that you previously added using addprop. You cannot remove the other properties in T.Properties, although you can delete the values they contain.
% Remove the Instrument and SourceFile properties from T.Properties.CustomProperties.

T = rmprop(T,{'Instrument','SourceFile'});
T.Properties

%
% Copyright 2018 The MathWorks, Inc.