Introduce a fixed time delay

416 visualizaciones (últimos 30 días)
ANUBHAV SINHA
ANUBHAV SINHA el 28 de Mzo. de 2012
Respondida: Surama Biswas el 24 de Mayo de 2019
Hi, I want a time delay of, say, 2minutes be introduced in between the execution of two statements. Can anyone suggest about how to achieve that....Any definite MATLAB functions available for that?
Ofcourse I have the idea of running an infinite loop for a calculated number of cycles to achieve that ...but I dont think that is an universal best way to do it and make the program 'computer-independent'.
Thanks.
Anubhav

Respuesta aceptada

Image Analyst
Image Analyst el 28 de Mzo. de 2012
How about
pause(120.0);

Más respuestas (1)

Surama Biswas
Surama Biswas el 24 de Mayo de 2019
Also you can evaluate how much time required to execute your function f, by using timeit(f) and then use pause or simply using pause(timeit(f)).

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by