Main Content

set

Set tscollection properties

Description

tscprop = set(tsc) returns all property values of a tscollection object tsc.

tscprop = set(tsc,propname) displays the property specified in propname. This syntax is equivalent to the command tscprop = tsc.propname. For a full list of tscollection property names, see tscollection.

example

set(tsc,propname,propval) sets the property propname of tsc to the value propval. This syntax is equivalent to the command tsc.propname = propval. You can set multiple properties and their values at a time by using comma-separated pairs. For a full list of tscollection property names and corresponding valid values, see tscollection.

Examples

collapse all

Create a tscollection object from two timeseries objects and set the Name property.

ts1 = timeseries(rand(5,1),'Name','ts1');
ts2 = timeseries(rand(5,1),'Name','ts2');
tsc = tscollection({ts1,ts2});
tscprop = set(tsc,'Name','newname')
Time Series Collection Object: newname

Time vector characteristics

      Start time            0 seconds
      End time              4 seconds

Member Time Series Objects:

      ts1
      ts2

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

Property value, specified as a scalar. For a full list of tscollection property names and valid values, see tscollection.

Introduced before R2006a