This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

append

Concatenate timeseries objects in time

Syntax

ts = append(ts1,ts2,…,tsN)

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

See Also

Introduced before R2006a