Class Definition: tscollection

datatypes: tscollection

Collection of time series on one time vector.

A tscollection object holds several timeseries objects, its members, which share one time vector: a sample of the collection is the sample of every member at one time. Each member is reached by its name, as tc.name, and keeps its own data, quality codes, events and metadata; only the time vector and its TimeInfo are the collection’s.

tscollection is a value class: every method returns a modified copy and leaves its input unchanged.

Its size is the number of samples by the number of members, and tc(i, j) selects samples i of members j, the members given by position or by name.

Member names are unique ignoring case, and read with the exact name; MATLAB reads tc.A for a member a. A member cannot take the name of one of the four properties.

See also: timeseries, istscollection, timeseries2timetable, tsdata.timemetadata

Source Code: tscollection

The tscollection class contains the following properties:

A character vector, 'unnamed' by default. A string scalar is converted; any other value is refused, where MATLAB accepts it.

A column vector of finite, non-decreasing times, in tc.TimeInfo.Units, counted from tc.TimeInfo.StartDate when that is set, and stored as double. Repeated times are allowed. Assigning it gives every member the new times, without moving any sample; it must hold as many times as there are samples, and an unsorted one is refused.

The tscollection class offers the following public methods:

tscollection Create a ‘tscollection’ object.
get Return property values and members.
set Set property values and members.
fieldnames Return the names of the properties and members.
properties Return the names of the properties and members.
size Return the number of samples and the number of members.
length Return the number of samples.
isempty True for a collection with no samples.
isequal True when collections are equal.
addts Add members to a collection.
removets Remove members from a collection.
gettimeseriesnames Return the names of the members.
settimeseriesnames Rename a member.
setTimeseriesName Rename a member.
addsampletocollection Add samples to every member.
delsamplefromcollection Remove samples from every member.
getsampleusingtime Return a collection of the samples at a time or between two times.
hasduplicatetimes True where a collection repeats a time.
getabstime Return the dates of the samples as text.
setabstime Set the time vector of a collection from dates.
resample Evaluate every member at new times.
vertcat Join collections end to end in time.
horzcat Join the members of collections.
get Return property values and members.
get Return property values and members.
get Return property values and members.
get Return property values and members.