Main Content

horzcat

Horizontally concatenate tscollection objects

Description

example

tscout = horzcat(tsc1,tsc2,…,tscN) horizontally concatenates the tscollection objects tsc1, tsc2,…, tscN, which contains the timeseries from the concatenated objects. Each tscollection in the list must have the same time vector.

Examples

collapse all

Create two tscollection objects and horizontally concatenate them.

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');
tsc1 = tscollection(ts1);
tsc2 = tscollection(ts2);
tscout = horzcat(tsc1,tsc2)
Time Series Collection Object: unnamed

Time vector characteristics

      Start time            1 seconds
      End time              5 seconds

Member Time Series Objects:

      Acceleration
      Speed

Input Arguments

collapse all

List of tscollection objects to concatenate, specified as a comma-separated list of scalar tscollection objects.

Introduced before R2006a