System time Matlab

Hello to everybody!
I have a very simple question. Is there a Matlab routine which returns the current system time showing up to milliseconds?
Thanks to everybody in here and my best regards!
Jason.

 Accepted Answer

Using FFF:
datestr(now,'dd-mm-yyyy HH:MM:SS FFF')

More Answers (3)

now

3 Comments

To prove it is milliseconds:
a=datevec(now);
a(6)
ans =
48.0060
Warning: although it is millisecond precision, it is not necessarily millisecond accuracy.
Right you are. I myself also can write down time in nanoseconds, but it doesn't make sense.

Sign in to comment.

jason beckell
jason beckell on 25 Jan 2012

0 votes

Thank you all for your answers, I finally made it :) Thank you again!
Jason.

Categories

Community Treasure Hunt

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

Start Hunting!