how to stop in Gui
1 次查看(过去 30 天)
显示 更早的评论
I am running a subroutine of controlling the movement of a stage from one place to another. I like to install a 'stop' button in GUI so I can stop the movement anytime I want.
Is there any way I can do it without breaking the subroutine, namely writing the steps of the subrountine into the program itself?
0 个评论
回答(2 个)
Walter Roberson
2011-10-5
You would have to set a value somewhere that the subroutine periodically checked and exited if the value so indicated.
2 个评论
Sean de Wolski
2011-10-5
Sounds like you want to use a timer:
doc timer
2 个评论
Walter Roberson
2011-10-5
Not sure how a timer would assist when it is a matter of a stop *button* ?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!