Introduce a fixed time delay
416 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
更多回答(1 个)
Surama Biswas
2019-5-24
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)).
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!