Units for Tic/Toc?

14 vues (au cours des 30 derniers jours)
Tyler
Tyler le 22 Août 2016
Hi all,
I would just like to verify that the units for tic/toc are always in seconds. If I run something for multiple days, will it still read an answer in seconds (e.g. 6 days, 4 hours ~ 532800 seconds)? I would prefer not to test this one out.
Thanks!

Réponse acceptée

Star Strider
Star Strider le 22 Août 2016
According the the documentation, yes. (I’ve not tried it myself, either.) I did use clock and etime when I ran simulations that ran all night, and they accumulated accurately over several hours, so if you have any doubts, use them.
You can get the days-hours-minutes-seconds using the regular date functions:
TotalTime = datevec(datenum([0 0 0 0 0 532800]));

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by