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!