I need to make a continuous timer
Mostra commenti meno recenti
I need to make a continuous timer to be used with a Data Acquisition program. I am saving the acquired data every minute, and my timer will occur every hour, so I cannot use pause instead of a timer because I will not be able to save my data. I have been able to create timers that activate on a periodic basis, but they have a finite number of periods. I am looking to make a timer that runs indefinitely. I am using the core Matlab program to acquire my data, this program is in an .m file.
1 Commento
Guillaume
il 9 Nov 2015
" but they have a finite number of periods"
As far as I know, this is not true.
Risposta accettata
Più risposte (1)
TastyPastry
il 9 Nov 2015
0 voti
If you want to measure performance in real time (i.e. seconds), you can use the functions tic() and toc() which start and read the timer, respectively. Call tic() again to reset the timer. Alternatively, there are functions timeit() and cputime() depending on what you're trying to time.
1 Commento
Javier
il 9 Nov 2015
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!