append
Concatenate timeseries
objects in time
Description
ts = append(
creates a new
ts1,ts2,…,tsN
)timeseries
object by concatenating
timeseries
objects ts1
,
ts2
, and so on, along the time dimension.
Examples
Append Two timeseries
Objects
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: tsdata.timemetadata Data: [5x1 double] DataInfo: tsdata.datametadata
ts2 = timeseries(rand(5,1),[6 7 8 9 10],"Name","Series 2")
timeseries Common Properties: Name: 'Series 2' Time: [5x1 double] TimeInfo: tsdata.timemetadata Data: [5x1 double] DataInfo: tsdata.datametadata
Append the two timeseries
objects by time. The output timeseries
object has no name even when the two inputs have names.
ts = append(ts1,ts2)
timeseries Common Properties: Name: 'unnamed' Time: [10x1 double] TimeInfo: tsdata.timemetadata Data: [10x1 double] DataInfo: tsdata.datametadata
Display the time samples of the result.
ts.Time
ans = 10×1
1
2
3
4
5
6
7
8
9
10
Input Arguments
ts1,ts2,…,tsN
— Input timeseries
list of scalar timeseries
objects
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 followingtimeseries
in the list.The sample size of each input
timeseries
must be the same.
Data Types: timeseries
Extended Capabilities
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool
or accelerate code with Parallel Computing Toolbox™ ThreadPool
.
Version History
Introduced before R2006a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)