Main Content

get

Query timeseries properties

Description

example

tsinfo = get(ts) returns all properties of the timeseries object ts.

example

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.

Examples

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.

tslength = get(ts,'Length')
tslength = 5

Input Arguments

collapse all

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

See Also

|

Introduced before R2006a