get

Query tscollection properties

Description

example

tscinfo = get(tsc) returns all properties of the tscollection object tsc.

example

tscinfo = get(tsc,propname) returns the value of the property propname. For a full list of tscollection property names, see tscollection.

Examples

collapse all

Create a tscollection object from two timeseries objects and display its properties.

ts1 = timeseries(rand(5,1),'Name','ts1');
ts2 = timeseries(rand(5,1),'Name','ts2');
tsc = tscollection({ts1,ts2});
tscinfo = get(tsc)
tscinfo = struct with fields:
        Name: 'unnamed'
        Time: [5x1 double]
    TimeInfo: [1x1 tsdata.timemetadata]
      Length: 5
         ts1: [1x1 timeseries]
         ts2: [1x1 timeseries]

Display only the Length property.

tsclength = get(tsc,'Length')
tsclength = 5

Input Arguments

collapse all

Input tscollection, specified as a scalar.

Property name, specified as a character vector. For a full list of tscollection property names, see tscollection.

Data Types: char

Introduced before R2006a