When is the StartFcn executed when I use STARTAT with the TIMER object in MATLAB 7.6 (R2008a)?
Mostra commenti meno recenti
I create a timer with a starting function 'StartFcn' and the timer function 'TimerFcn' and start the timer with a 3 second delay using a STARTAT function:
function simpletimer
disp('Beginning of the simple timer function')
function starttimer(varargin)
disp('Executing StartFcn');
end
function testtimer(varargin)
disp('Executing TimerFcn');
end
t = timer('TimerFcn', @testtimer, 'StartFcn', @starttimer);
startat(t,now+3/24/60/60);
disp('End of simple timer function')
end
I expect the following sequence of the messages displayed:
Beginning of the simple timer function
End of simple timer function
Executing StartFcn
Executing TimerFcn
Instead, I get the following sequence of outputs:
Beginning of the simple timer function
Executing StartFcn
End of simple timer function
Executing TimerFcn
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Background and Parallel Processing in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!