MATLAB Function Reference | ![]() ![]() |
Display or get timer object properties
Syntax
Description
get(obj)
displays all property names and their current values for timer object obj
.
V = get(obj)
returns a structure, V
, where each field name is the name of a property of obj
and each field contains the value of that property.
V = get(obj,'
returns the value, PropertyName
')
V
, of the timer object property specified in PropertyName
.
If PropertyName
is a1-by-N or N-by-1 cell array of strings containing property names, V
is a 1-by-N cell array of values. If obj
is a vector of timer objects, V
is an M-by-N cell array of property values where M is equal to the length of obj
and N is equal to the number of properties specified.
Example
t = timer; get(t) AveragePeriod: NaN BusyMode: 'drop' ErrorFcn: [] ExecutionMode: 'singleShot' InstantPeriod: NaN LastError: 'none' Name: 'timer-1' Period: 1 Running: 'off' StartDelay: 0 StartFcn: [] StopFcn: [] Tag: '' TasksToExecute: Inf TasksExecuted: 0 TimerFcn: [] Type: 'timer' UserData: [] get(t, {'StartDelay','Period'}) ans = [0] [1]
See Also
![]() | get (serial) | ginput | ![]() |