Quantcast

Documentation Center

  • Trial Software
  • Product Updates

append

Class: timeseries

Concatenate time series objects in time dimension

Syntax

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

Description

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

Tips

  • 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.

Input Arguments

ts1

The first timeseries object that you want to append.

ts2

The second timeseries object that you want to append.

tsn

The nth timeseries object that you want to append.

Output Arguments

ts

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

Examples

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)

See Also

Was this topic helpful?