GUI push button with delay
조회 수: 3 (최근 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에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!