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.

Object Precedence ................................. 9-70<br />

Specifying Precedence of User-Defined Classes ......... 9-70<br />

How <strong>MATLAB</strong> Determines Which Method to Call ..... 9-72<br />

Selecting a Method ................................ 9-72<br />

Querying Which Method <strong>MATLAB</strong> Will Call ........... 9-75<br />

10<br />

Scheduling Program Execution with Timers<br />

Using a <strong>MATLAB</strong> Timer Object ...................... 10-3<br />

Example: Displaying a Message ..................... 10-4<br />

Creating Timer Objects ............................ 10-5<br />

Timer Object Naming .............................. 10-6<br />

Working with Timer Object Properties .............. 10-7<br />

Retrieving the Value of Timer Object Properties ........ 10-7<br />

Setting the Value of Timer Object Properties ........... 10-8<br />

Starting and Stopping Timers ...................... 10-10<br />

Starting a Timer .................................. 10-10<br />

Starting a Timer at a Specified Time .................. 10-11<br />

Stopping Timer Objects ............................ 10-11<br />

Blocking the <strong>MATLAB</strong> Command Line ................ 10-12<br />

Creating and Executing Callback Functions ......... 10-14<br />

Associating Commands with Timer Object Events ....... 10-14<br />

Creating Callback Functions ........................ 10-15<br />

Specifying the Value of Callback Function Properties .... 10-17<br />

Timer Object Execution Modes ...................... 10-19<br />

Executing a Timer Callback Function Once ............ 10-19<br />

Executing a Timer Callback Function Multiple Times .... 10-20<br />

Handling Callback Function Queuing Conflicts ......... 10-21<br />

Deleting Timer Objects from Memory ............... 10-23<br />

xviii<br />

Contents

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

Saved successfully!

Ooh no, something went wrong!