Units for Tic/Toc?

7 ビュー (過去 30 日間)
Tyler
Tyler 2016 年 8 月 22 日
回答済み: Star Strider 2016 年 8 月 22 日
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!

採用された回答

Star Strider
Star Strider 2016 年 8 月 22 日
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]));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeApp Building についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by