4.33333

4.3 | 3 ratings Rate this file 99 downloads (last 30 days) File Size: 1.38 KB File ID: #8452

Example: Using Nested Functions for Timers

by Scott Hirsch

 

08 Sep 2005 (Updated 09 Sep 2005)

Code covered by BSD License  

Example code from MATLAB News & Notes article on nested functions.

Download Now | Watch this File

File Information
Description

This is a simple example of how nested functions can simplify the writing of callback functions for writing continuously-running applications. Callback functions are used by timer objects and the various objects in the Test & Measurement Toolboxes (Data Acquisition Toolbox, Instrument Control Toolbox, Image Acquisition Toolbox) to associate MATLAB code with events such as timers.

This example contains the code included in the October, 2005 MATLAB News & Notes tip on this topic.

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
29 Sep 2006 Bernhard Hampel-Vogedes  
19 Oct 2006 master user  
15 Nov 2007 Gunter Wahl

A bit more explanation of the way (repetitions?) to call the routine would be nice.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
nested function Scott Hirsch 22 Oct 2008 07:59:39
timer Scott Hirsch 22 Oct 2008 07:59:39
realtime Scott Hirsch 22 Oct 2008 07:59:39
callback Scott Hirsch 22 Oct 2008 07:59:39
function handle Scott Hirsch 22 Oct 2008 07:59:39
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com