Create timeseries
object
Time series are data vectors sampled over time, in order, often at regular intervals. They are distinguished from randomly sampled data that form the basis of many other data analyses. Time series represent the timeevolution of a dynamic population or process. The linear ordering of time series gives them a distinctive place in data analysis, with a specialized set of techniques. Time series analysis is concerned with:
Identifying patterns
Modeling patterns
Forecasting values
creates an empty timeseries object.ts
= timeseries
creates an empty timeseries object using the name, ts
= timeseries(tsname
) tsname
,
for the timeseries object. This name can differ from the timeseries
variable name.
creates
the timeseries object using the specified ts
= timeseries(data
) data
.
creates the timeseries object using the specified ts
= timeseries(data
,time
) data
and time
.
specifies quality in terms of codes defined by ts
= timeseries(data
,time
,quality
) QualityInfo.Code
.
creates
the timeseries object using the specified ts
= timeseries(data
,'Name',tsname
)data
and
the name, tsname
.
creates
the timeseries object using the specified ts
= timeseries(data
,time
,'Name',tsname
)data
, time
,
and the name, tsname
.
uses
the specified ts
= timeseries(data
,time
,quality
,'Name',tsname
)quality
and the name, tsname
.

The timeseries data, which can be an array of samples 

Timeseries name specified as a string Default: ' ' 

The time vector. When time values are date strings, you must specify
Interpolating timeseries data using methods like Default: A time vector that ranges from 

An integer vector with values When
When


Timeseries data, where each data sample corresponds to a specific time The data can be a scalar, a vector, or a multidimensional array.
Either the first or last dimension of the data must align with By default, Attributes:
 

Contains fields for storing contextual information about
 

An array of You add events by using the
 

Logical value (
Attributes:
 

Length of the time vector in the Attributes:
 

The This name can differ from the name of the  

An integer vector or array containing values When When Attributes:
 

Provides a lookup table that converts numerical
Lengths of  

Array of time values. When The length of Attributes:
 

Uses the following fields for storing contextual information
about
 

Logical value that specifies how to treat
 

Generic field for data of any class that you want to add to the object. Default: 
Methods to Query and Set Object Properties and Plot the Data
Methods to Calculate Descriptive Statistics for a timeseries
Object
Query  
Return the size of each data sample in a  
Return data quality descriptions based on the  
Plot the  
Set 
Add a data sample to a  
Concatenate  
Delete a sample from a  
Subtract the mean or bestfit line and remove all  
Shape frequency content of timeseries data using a 1D digital filter.  
Extract a datestring time vector from a  
Extract a subset of data samples from an existing  
Extract a subset of data samples from an existing  
Get the interpolation method for a  
Extract data samples from an existing  
Apply an ideal pass or notch (noncausal) filter to a  
Select or interpolate data in a  
Set the time values in the time vector as date strings.  
Set interpolation method for a  
Assign uniform time vector to  
Synchronize and resample two 
To construct an event object, use the constructor tsdata.event
. For an example of defining
events for a timeseries object, see Defining Events.
Add one or more events to a  
Delete one or more events from a  
Create a new  
Create a new  
Create a new  
Create a new  
Create a new  
Create a new 
timeseries
Objects
 Addition of the corresponding data values of 
 Subtraction of the corresponding data values of 
 Elementbyelement multiplication of 
 Matrixmultiply 
 Right elementbyelement division of 
 Right matrix division of 
 Elementbyelement leftarray divide of 
 Left matrix division of 
timeseries
ObjectReturn the interquartile range of  
Return the maximum value of  
Return the mean of  
Return the median of  
Return the minimum of  
Return the standard deviation of  
Return the sum of  
Return the variance of 
Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB documentation.
Create a timeseries
object called 'LaunchData'
that
contains four data sets, each stored as a column of length 5
and
using the default time vector:
b = timeseries(rand(5, 4),'Name','LaunchData')
Create a timeseries
object containing a single
data set of length 5
and a time vector starting
at 1
and ending at 5
:
b = timeseries(rand(5,1),[1 2 3 4 5])
Create a timeseries
object called 'FinancialData'
containing
five data points at a single time point:
b = timeseries(rand(1,5),1,'Name','FinancialData')