tscollection

Methods

Method Reference: tscollection.vertcat

tscollection: tc = vertcat (tc1, tc2, …)

Join collections end to end in time.

tc = [tc1; tc2; …] returns one collection holding the samples of every argument in turn. The collections must have the same members, by name, taken in the order of the first, with a warning when another orders them differently, as in MATLAB. Each must start at or after the end of the one before, so equal times where two meet give a repeated time. Each member is joined as timeseries.append joins series: times in the coarsest units among them, dates counted from the first start date, and samples of one size and one class, as in MATLAB.

A member’s quality codes are joined when it has them in every collection, and refused when only some do; MATLAB then gives a member that cannot be read, or drops them. The result keeps the name of the first collection, where MATLAB names it 'unnamed'.

See also: tscollection.horzcat, timeseries.append

Source Code: tscollection

[tc1; tc2] joins collections of the same members end to end in time.

 tc1 = tscollection ({timeseries([1; 2], [0; 1], 'Name', 'a'), ...
                      timeseries([10; 20], [0; 1], 'Name', 'b')});
 tc2 = tscollection ({timeseries([3; 4], [2; 3], 'Name', 'a'), ...
                      timeseries([30; 40], [2; 3], 'Name', 'b')});
 tc = [tc1; tc2];
 [tc.Time, tc.a.Data, tc.b.Data]
ans =

    0    1   10
    1    2   20
    2    3   30
    3    4   40