Using timer, How can I cleanly exit a function execution, when the timer fires in MATLAB?
Ältere Kommentare anzeigen
My problem is that I can't find a Function to callback as a 'TimerFcn', that cleanly exits my function without errors.
t = timer('StartDelay',2,'TimerFcn', );
Thanks in advance.
2 Kommentare
Guillaume
am 13 Dez. 2019
Can you explain more clearly what you're trying to do exactly, particularly, the order of execution of the various things you want to happen.
taima zoabi
am 13 Dez. 2019
Akzeptierte Antwort
Weitere Antworten (1)
Sean de Wolski
am 13 Dez. 2019
Why use a timer for this?
In the start of your function, start a tic
t = tic
Then periodically check
if toc(t)>2
return
end
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!