Programming Previous page   Next Page

Using a MATLAB Timer Object

To use a timer, perform these steps:

  1. Create a timer object.
  1. You use the timer function to create a timer object. See Creating Timer Objects for more information.

  1. Specify which MATLAB commands you want executed when the timer fires and control other aspects of timer object behavior.
  1. You use timer object properties to specify this information. To learn about all the properties supported by the timer object, see Working with Timer Object Properties. (You can also set timer object properties when you create them, in step 1.)

  1. Start the timer object.
  1. After you create the timer object, you must start it, using either the start or startat function. See Starting and Stopping Timers for more information.

  1. Delete the timer object when you are done with it.
  1. After you are finished using a timer object, you should delete it from memory. See Deleting Timer Objects from Memory for more information.


Previous page  Scheduling Program Execution with Timers Example: Displaying a Message Next page

© 1994-2005 The MathWorks, Inc.