timeseries to Collection
tscollection object containing one
timeseries object. Then, add a second
timeseries to the collection.
ts1 = timeseries([1.1 2.9 3.7 4.0 3.0]',1:5,... 'Name','Acceleration'); ts2 = timeseries([3.2 4.2 6.2 8.5 1.1]',1:5,... 'Name','Speed'); tscin = tscollection(ts1); tscout = addts(tscin,ts2)
Time Series Collection Object: unnamed Time vector characteristics Start time 1 seconds End time 5 seconds Member Time Series Objects: Acceleration Speed
tscin — Input
tscollection, specified as a scalar.
ts — Input
scalar | cell array
timeseries, specified as a scalar
timeseries object or a cell array of
character vector | cell array of character vectors
timeseries name, specified as a character vector or a
cell array of character vectors.
scalar | vector | multidimensional array
timeseries data, specified as a numeric or
logical scalar, vector, or multidimensional
timeseriesobjects that you add to the collection must have the same time vector as the collection. That is, the time vectors must have the same time values and units.
Suppose that the time vector of a
timeseriesobject is associated with calendar dates. When you add the
timeseriesto a collection with a time vector without calendar dates, the time vectors are compared based on the units and the values relative to the