Class Definition: tsdata.datametadata

datatypes: tsdata.datametadata

The data metadata of a timeseries.

A tsdata.datametadata object describes the samples of a timeseries: their units, how the series is evaluated between them, and any data the user attaches. It is what ts.DataInfo returns.

Source Code: tsdata.datametadata

The tsdata.datametadata class contains the following properties:

A character vector, '' by default. It is free text: nothing checks it against the data or converts the data with it.

A tsdata.interpolation object, 'linear' by default. A method name or a function handle may be assigned, and is converted. MATLAB starts a tsdata.datametadata created on its own with [] here, and a timeseries with 'linear'; here both start with 'linear'.

A logical scalar, false by default. In MATLAB it affects only addsample given a row of data, where true gives two-dimensional data whose time runs along its last dimension while the sample holds the whole row, a state no other method can read consistently. Here the orientation of the data always follows its dimensions, as IsTimeFirst of timeseries describes.

The tsdata.datametadata class offers the following public methods:

tsdata.datametadata: di = tsdata.datametadata ()

di = tsdata.datametadata () returns an object with Units '', Interpolation 'linear', UserData [] and InterpretSingleRowDataAs3D false. A timeseries creates its own; this is needed only to assign a whole new one to ts.DataInfo.

See also: timeseries, tsdata.interpolation

tsdata.datametadata: S = get (di)

tsdata.datametadata: value = get (di, name)

tsdata.datametadata: values = get (di, names)

S = get (di) returns a structure of every property of di. value = get (di, name) returns the property name, a character vector or a string scalar matched in any case, and values = get (di, names) a row cell array of the properties named in the cell array names. For an array, one name gives a cell array of its size, and no name, or several, a cell array with a row per object and a column per property.

See also: tsdata.datametadata.set, timeseries.get

tsdata.datametadata: set (di, name, value, …)

tsdata.datametadata: di2 = set (di, name, value, …)

tsdata.datametadata: S = set (di)

set (di, name, value, …) sets each property name, matched in any case, to its value, in the order given, in the variable di of the caller, which must therefore be a variable. Metadata held by a timeseries is set with dot assignment instead, as ts.TimeInfo.Units = 'days'.

di2 = set (di, name, value, …) returns the modified object and leaves di as it was. S = set (di) returns what get (di) does.

See also: tsdata.datametadata.get, timeseries.set