Query timeseries properties
timeseries
tsinfo = get(ts)
tsinfo = get(ts,propname)
example
tsinfo = get(ts) returns all properties of the timeseries object ts.
ts
tsinfo = get(ts,propname) returns the specified property propname of ts, and is equivalent to tsinfo = ts.propname. For a full list of timeseries property names, see timeseries.
propname
tsinfo = ts.propname
collapse all
Create a timeseries object, and display its properties.
ts = timeseries(rand(5,1)); tsinfo = get(ts)
tsinfo = struct with fields: Events: [] Name: 'unnamed' UserData: [] Data: [5x1 double] DataInfo: [1x1 tsdata.datametadata] Time: [5x1 double] TimeInfo: [1x1 tsdata.timemetadata] Quality: [] QualityInfo: [1x1 tsdata.qualmetadata] IsTimeFirst: 1 TreatNaNasMissing: 1 Length: 5
Display only the Length property.
Length
tslength = get(ts,'Length')
tslength = 5
Input timeseries, specified as a scalar.
Data Types: timeseries
Property name, specified as a character vector. For a full list of timeseries property names, see timeseries.
Data Types: char
char
set | timeseries
set
You have a modified version of this example. Do you want to open this example with your edits?