Effacer les filtres
Effacer les filtres

How to stop a program after a given time input?

1 vue (au cours des 30 derniers jours)
Emmy
Emmy le 11 Mai 2013
I created a function in which one input is time in seconds. I want the program to stop after this time has passed. However, I am only aware of the tic toc and the cputime and I can't find out how to apply these in my situation. I hope you can help me.
  1 commentaire
Daniel Shub
Daniel Shub le 14 Mai 2013
It really depends on what your code is doing. How exactly do you want it to "stop". Do you want MATLAB to exit?

Connectez-vous pour commenter.

Réponses (1)

Ryan G
Ryan G le 13 Mai 2013
Try the timer object using a single shot execution mode.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by