questions related with tic and toc ?

4 ビュー (過去 30 日間)
Sandy
Sandy 2016 年 3 月 31 日
回答済み: Sandy 2016 年 3 月 31 日
Hello Simulink and MATLAB user,
I greatly appreciate your help! Can someone please clarify my following questions.
1. what tic and toc stands for? ( It might be a stupid question.. my background is not computer science or programming)
2. I have noticed that in a new editor with just one line "time=tic' gives a really big number like '30384030483480' What does it mean?
3. Does "time=toc" give elapsed time in seconds ?

採用された回答

jgg
jgg 2016 年 3 月 31 日
編集済み: jgg 2016 年 3 月 31 日
1) They're the sounds a mechanical clock makes. Tick, tock, tick, tock as the pendulum swings back and forth.
2) The value of time tic command is the internal timer value at the moment the command is called. It's a big number because it's in small fractions of a second, but you shouldn't rely on the value of the number. It's only meant to be used as a relative input; relative to toc
3) Yes.
You can answer most of these questions by looking at the documentation by typing help tic or help toc

その他の回答 (2 件)

Sandy
Sandy 2016 年 3 月 31 日
Hi Jgg,
Thanks a lot!!

Sandy
Sandy 2016 年 3 月 31 日
Hi Jgg,
Thanks a lot!!

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by