GUI push button with delay
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
chirag hb
el 3 de Nov. de 2017
Respondida: chirag hb
el 3 de Nov. de 2017
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 comentarios
Respuesta aceptada
Jos (10584)
el 3 de Nov. de 2017
Editada: Jos (10584)
el 3 de Nov. de 2017
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 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Fuzzy Logic Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!