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.
Examples
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
Input timeseries
, specified as a list of scalartimeseries
objects to concatenate.
- The last time sample of an input
timeseries
must be earlier than or equal to the first time of the followingtimeseries
in the list. - The sample size of each input
timeseries
must be the same.
Data Types: timeseries
Extended Capabilities
Version History
Introduced before R2006a