Main Content

set

Set tsdata.event properties

Description

tseprop = set(tse) returns all property values of a tsdata.event object tse.

tseprop = set(tse,propname) displays the property specified in propname. This syntax is equivalent to the command tseprop = tse.propname. For a full list of tsdata.event property names, see tsdata.event.

example

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

Examples

collapse all

Create a tsdata.event object and set the time units to 'hours'.

tse = tsdata.event('MyEvent',3);
set(tse,'Units','hours');
tseunits = tse.Units
tseunits = 
'hours'

Input Arguments

collapse all

Input tsdata.event, specified as a scalar.

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

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

Introduced before R2006a