append - Concatenate timeseries objects in time - MATLAB (original) (raw)

Main Content

Concatenate timeseries objects in time

Syntax

Description

ts = append([ts1,ts2,…,tsN](#d126e1512143)) creates a newtimeseries object by concatenatingtimeseries objects ts1,ts2, and so on, along the time dimension.

example

Examples

collapse all

Create two timeseries objects.

ts1 = timeseries(rand(5,1),[1 2 3 4 5],"Name","Series 1")

timeseries

Common Properties: Name: 'Series 1' Time: [5x1 double] TimeInfo: [1x1 tsdata.timemetadata] Data: [5x1 double] DataInfo: [1x1 tsdata.datametadata]

More properties, Methods

ts2 = timeseries(rand(5,1),[6 7 8 9 10],"Name","Series 2")

timeseries

Common Properties: Name: 'Series 2' Time: [5x1 double] TimeInfo: [1x1 tsdata.timemetadata] Data: [5x1 double] DataInfo: [1x1 tsdata.datametadata]

More properties, Methods

Append the two timeseries objects by time. The output timeseries object has no name even when the two inputs have names.

timeseries

Common Properties: Name: 'unnamed' Time: [10x1 double] TimeInfo: [1x1 tsdata.timemetadata] Data: [10x1 double] DataInfo: [1x1 tsdata.datametadata]

More properties, Methods

Display the time samples of the result.

ans = 10×1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

Input Arguments

collapse all

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

Data Types: timeseries

Extended Capabilities

Version History

Introduced before R2006a