Main Content

Time Series

Data vectors sampled over time

Time series represent the time-evolution of a dynamic population or process. They are used to identify, model, and forecast patterns and behaviors in data that is sampled over discrete time intervals.

Timetables are recommended over timeseries objects for this type of data. Timetables can store time-stamped data of varying types and have a broad set of supporting functions to align, combine, and perform calculations. To get started with timetables, see Create Timetables.

Functions

expand all

timeseriesCreate timeseries object
timeseries2timetableConvert timeseries objects to timetable (Since R2021b)
resampleResample time vector in timeseries or tscollection
synchronizeSynchronize and resample two timeseries objects using common time vector
detrendSubtract mean or best-fit line from timeseries object
filterModify frequency content of timeseries objects
idealfiltertimeseries ideal filter
plotPlot timeseries
appendConcatenate timeseries objects in time
addsampleAdd data sample to timeseries object
delsampleRemove sample from timeseries object
setabstimeSet timeseries or tscollection times as date character vectors
setinterpmethodSet default interpolation method for timeseries object
setuniformtimeModify uniform timeseries time vector
getsamplesSubset of timeseries
getsampleusingtimeSubset of timeseries or tscollection data
getdatasamplesAccess timeseries data samples
getdatasamplesizetimeseries data sample size
getabstimeConvert timeseries or tscollection time vector to cell array
getinterpmethodtimeseries interpolation method
getqualitydesctimeseries data quality
iqrInterquartile range of timeseries data
maxMaximum of timeseries data
meanMean of timeseries data
medianMedian of timeseries data
minMinimum of timeseries data
stdStandard deviation of timeseries data
sumSum of timeseries data
varVariance of timeseries data
tscollectionCreate tscollection object
addtsAdd timeseries to tscollection
removetsRemove timeseries from tscollection
addsampletocollectionAdd sample to tscollection
delsamplefromcollectionDelete sample from tscollection
gettimeseriesnamesNames of timeseries in tscollection
settimeseriesnamesRename timeseries in tscollection
tsdata.eventCreate tsdata.event object
addeventAdd event to timeseries
deleventRemove event from timeseries
findEventQuery tsdata.event by name
getTimeStrQuery tsdata.event times
gettsafterateventCreate timeseries at or after event
gettsaftereventCreate timeseries after event
gettsateventCreate timeseries at event
gettsbeforeateventCreate timeseries at or before event
gettsbeforeeventCreate timeseries before event
gettsbetweeneventsCreate timeseries between events

Topics

Related Information