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. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Class: timeseries

Concatenate time series objects in time dimension


ts = append(ts1,ts2, ... tsn)


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

Input Arguments


The first timeseries object that you want to append.


The second timeseries object that you want to append.


The nth timeseries object that you want to append.

Output Arguments


The timeseries object that results from appending the input timeseries objects.


After creating timeseries objects, ts1 and ts2, append them:

ts1 = timeseries(rand(5,1),[1 2 3 4 5]);
ts2 = timeseries(rand(5,1),[6 7 8 9 10]);
ts3 = append(ts1, ts2)


  • A single overlapping time between each input time series is valid, as long as the overlapping samples are identical.

  • The time vectors must not overlap by a nonzero amount. That is, the last time in ts1 must be earlier than or equal to the first time in ts2.

  • The sample size of the time series must be the same.

See Also

Was this topic helpful?