Programming Previous page   Next Page

Scheduling Program Execution with Timers


MATLAB includes a timer object that you can use to schedule the execution of MATLAB commands. This chapter describes how you can create timer objects, start a timer running, and specify the processing that you want performed when a timer fires. A timer is said to fire when the amount of time specified by the timer object elapses and the timer object executes the commands you specify.

Using a MATLAB Timer Object
Step-by-step procedure for using a timer object with a simple example
Creating Timer Objects
Using the timer function to create a timer object
Working with Timer Object Properties
Setting timer object properties and retrieving the values of timer object properties
Starting and Stopping Timers
Using the start or startat function to start timer objects; using the stop function to stop them, and blocking the command line
Creating and Executing Callback Functions
Creating a callback function and specifying it as the value of a timer object callback property
Timer Object Execution Modes
Using the ExecutionMode property to control when a timer object executes
Deleting Timer Objects from Memory
Using the delete function to delete a timer object
Finding All Timer Objects in Memory
Using the timerfind and timerfindall functions to determine if timer objects exist in memory


Previous page  Querying Which Method MATLAB Will Call Using a MATLAB Timer Object Next page

© 1994-2005 The MathWorks, Inc.