Using timer, How can I cleanly exit a function execution, when the timer fires in MATLAB?
古いコメントを表示
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 件のコメント
Guillaume
2019 年 12 月 13 日
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
2019 年 12 月 13 日
採用された回答
その他の回答 (1 件)
Sean de Wolski
2019 年 12 月 13 日
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
1 件のコメント
taima zoabi
2019 年 12 月 13 日
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!