23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Working with Timer Object Properties<br />

Working with Timer Object Properties<br />

The timer object supports many properties that provide information about the<br />

current state of the timer object and control aspects of its functioning. The<br />

following sections describe<br />

• “Retrieving the Value of Timer Object Properties” on page 10-7<br />

• “Setting the Value of Timer Object Properties” on page 10-8<br />

To get information about timer object properties, see the timer function<br />

reference page.<br />

Retrieving the Value of Timer Object Properties<br />

To retrieve the value of a timer object property, you can use the get function<br />

or use subscripts (dot notation) to access the field.<br />

The following example uses the set function to retrieve the value of the<br />

ExecutionMode property:<br />

t = timer;<br />

tmode = get(t,'ExecutionMode')<br />

tmode =<br />

singleShot<br />

The following example uses dot notation to retrieve the value of the<br />

ExecutionMode property:<br />

tmode = t.ExecutionMode<br />

tmode =<br />

singleShot<br />

To view a list of all the properties of a timer object, use the get function,<br />

specifying the timer object as the only argument:<br />

10-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!