Stopping a Timer via another function
显示 更早的评论
Hello.
Is there a way to stop a timer from another function whilst it is running. Im not sure what to pass to the other function:
This is my timer and wait part
T = timer('TimerFcn',@(~,~)disp('Fired.'),'StartDelay',10);
start(T)
wait(T)
delete(T)
I want to have a stop button which will allow me to stop if the wait hasn't finished, but not sure how to pass the timer object to that function to then apply
stop(T)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!