Problem with 'timer object'

조회 수: 3 (최근 30일)
Jmentday
Jmentday 2013년 3월 14일
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

답변 (1개)

Vishal Rane
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.

카테고리

Help CenterFile Exchange에서 Code Execution에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by