Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

get

Query timeseries properties

Syntax

tsinfo = get(ts)
tsinfo = get(ts,propname)

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

Was this topic helpful?