MATLAB Function Reference | ![]() ![]() |
Configure or display timer object properties
Syntax
set(obj)
prop_struct = set(obj)
set(obj,'
PropertyName
')
prop_cell = set(obj,'
PropertyName
')
set(obj,'
PropertyName
',PropertyValue,...)
set(obj,S)
set(obj,PN,PV)
Description
set(obj)
displays property names and their possible values for all configurable properties of timer object obj
. obj
must be a single timer object.
prop_struct=set(obj)
returns the property names and their possible values for all configurable properties of timer object obj
. obj
must be a single timer object. The return value, prop_struct
, is a structure whose field names are the property names of obj
, and whose values are cell arrays of possible property values or empty cell arrays if the property does not have a finite set of possible string values.
set(obj,'
displays the possible values for the specified property, PropertyName
')
PropertyName
, of timer object obj
. obj
must be a single timer object.
prop_cell=set(obj,'
returns the possible values for the specified property, PropertyName
')
PropertyName
, of timer object obj
. obj
must be a single timer object. The returned array, prop_cell
, is a cell array of possible value strings or an empty cell array if the property does not have a finite set of possible string values.
set(obj,'
configures the property, PropertyName
',PropertyValue,...)
PropertyName
, to the specified value, PropertyValue
, for timer object obj
. You can specify multiple property name/property value pairs in a single statement. obj
can be a single timer object or a vector of timer objects, in which case set
configures the property values for all the timer objects specified.
set(obj,S)
configures the properties of obj
, with the values specified in S
, where S
is a structure whose field names are object property names.
set(obj,PN,PV)
configures the properties specified in the cell array of strings, PN
, to the corresponding values in the cell array PV
, for the timer object obj
. PN
must be a vector. If obj
is an array of timer objects, PV
can be an M-by-N cell array, where M is equal to the length of timer object array and N is equal to the length of PN
. In this case, each timer object is updated with a different set of values for the list of property names contained in PN
.
Note
Param-value string pairs, structures, and param-value cell array pairs can be use in the same call to set .
|
Example
Display all configurable properties and their possible values.
set(t) BusyMode: [ {drop} | queue | error ] ErrorFcn ExecutionMode: [{singleShot}|fixedSpacing|fixedDelay|fixedRate] LastError: [ {none} | busy | callback ] Name Period StartDelay StartFcn StopFcn Tag TasksToExecute TimerFcn UserData
Retrieve the possible values of the ExecutionMode
property.
Set the value of a specific timer object property.
Set the values of several properties of the timer object.
Use a cell array to specify the names of the properties you want to set and another cell array to specify the values of these properties.
See Also
![]() | setstr | setxor | ![]() |