Does it exist a function which is similar to time() function of C ambient ?

1 次查看(过去 30 天)
Hi, i'm working with random number generation, I would like to know if exists, in Matlab, a function like time(0) of C ambient (like emacs) which gives the number of seconds from a certain day.

采纳的回答

Jan
Jan 2017-10-11
编辑:Jan 2017-10-11
The number of seconds of the current day:
s = rem(now, 1) * 86400;
Number of seconds since 17-Mar-2011:
s = (now - datenum('17-Mar-2011')) * 86400;
This does not use the modern datetime object.

更多回答(1 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by