Main Content

append

Concatenate timeseries objects in time

Description

example

ts = append(ts1,ts2,…,tsN) creates a new timeseries object by concatenating timeseries objects ts1, ts2, and so on, along the time dimension.

Examples

collapse all

Create two timeseries objects, and append them by time. Display the time samples of the resulting timeseries.

ts1 = timeseries(rand(5,1),[1 2 3 4 5]);
ts2 = timeseries(rand(5,1),[6 7 8 9 10]);
ts = append(ts1,ts2);
ts.Time
ans = 10×1

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10

Input Arguments

collapse all

Input timeseries, specified as a list of scalar timeseries objects to concatenate.

  • The last time sample of an input timeseries must be earlier than or equal to the first time of the following timeseries in the list.

  • The sample size of each input timeseries must be the same.

Data Types: timeseries

Version History

Introduced before R2006a

See Also