Problem with 'timer object'
1 回表示 (過去 30 日間)
古いコメントを表示
hi! If I run de exemple from : http://www.mathworks.com/help/matlab/matlab_prog/creating-and-executing-callback-functions.html#f9-42494 the output is:
StartFcn event occurred at 14-Mar-2013 18:00:21
My start message
StopFcn event occurred at 14-Mar-2013 18:00:21
My stop message
Warning: You are deleting one or more running timer objects. MATLAB has automatically
stopped them before deletion.
not:
StartFcn event occurred at 10-Mar-2004 17:16:59
My start message
Hello World!
Hello World!
StopFcn event occurred at 10-Mar-2004 17:16:59
My stop message
-delete(t) is executed before t.TimerFcn being executed....why? Thanks
0 件のコメント
回答 (1 件)
Vishal Rane
2013 年 3 月 15 日
編集済み: Vishal Rane
2013 年 3 月 15 日
Are you running those commands one by one in the command window OR in the form of a script ?
If those commands are in the form of a script, then probably the 'delete(t)' command deletes the timer object before any of the callbacks are executed.
To get the output shown, run till the start(t) command only.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!