GUI push button with delay
2 次查看(过去 30 天)
显示 更早的评论
I have two files where first button should run in first click and after delay the second file should run . Any comments or command to delay a second file to run.
0 个评论
采纳的回答
Jos (10584)
2017-11-3
编辑:Jos (10584)
2017-11-3
You can create a timer object to delay the execution of a function. Here is an example:
SecondFunction = @() disp([' ... ' num2str(toc) ' seconds have elapsed ...']) ;
TimerHandle = timer('StartDelay',2,'TimerFcn','SecondFunction()') ;
tic ;
start(TimerHandle)
disp('Hello, I am going to be busy for about four seconds ...')
pause(4) % ... busy ...
disp(['Now it is ' num2str(toc) ' seconds later, so ... Goodbye!'])
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!