| MATLAB Function Reference | ![]() |
tsc = tscollection(TimeSeries)
tsc = tscollection(Time)
tsc = tscollection(Time,TimeSeries,'Parameter',Value,...)
tsc = tscollection(TimeSeries) creates a tscollection object tsc with one or more timeseries objects already in the MATLAB® workspace. The argument TimeSeries can be a
Single timeseries object
Cell array of timeseries objects
tsc = tscollection(Time) creates an empty tscollection object with the time vector Time. When time values are date strings, you must specify Time as a cell array of date strings.
tsc = tscollection(Time,TimeSeries,'Parameter',Value,...) creates a tscollection object with optional parameter-value pairs you enter after the Time and TimeSeries arguments. You can specify the following parameters:
Name — String that specifies the name of this tscollection object
IsDatenum — Logical value (true or false) that when set to true specifies that the Time values are dates in the format of MATLAB serial dates.
A time series collection object is a MATLAB variable that groups several time series with a common time vector. The time series that you include in the collection are called members of this collection.
This table lists the properties of the tscollection object. You can specify the Time, TimeSeries, and Name properties as input arguments in the constructor.
Property | Description |
|---|---|
Name | tscollection name as a string. This can differ from the tscollection name in the MATLAB workspace. |
Time | When TimeInfo.StartDate is empty, values are measured relative to 0 . When TimeInfo.StartDate is defined, values represent date strings measured relative to the StartDate. The length of Time must be the same as the first or the last dimension of Data for each collection . |
TimeInfo | Contains fields for contextual information about Time:
|
The following example shows how to create a tscollection object.
load count.dat
Create three timeseries objects to store each set of data:
count1 = timeseries(count(:,1),1:24,'name', 'ts1'); count2 = timeseries(count(:,2),1:24,'name', 'ts2');
Create a tscollection object named tsc and add to it two out of three time series already in the MATLAB workspace, by using the following syntax:
tsc = tscollection({count1 count2},'name','tsc')
addts, datestr, setabstime (tscollection), timeseries, tsprops
![]() | try | tsdata.event | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |