creating time vector ?

2 次查看(过去 30 天)
pruth
pruth 2018-5-21
评论: pruth 2018-5-21
silly question.
how to create time series vector for a period of one specific date(say 2 February 2010) to some specific date(11 November 2010) with an interval of one second, one minute, 1 hour,3 hours etc?

采纳的回答

Stephen23
Stephen23 2018-5-21
编辑:Stephen23 2018-5-21
t1 = datetime(2010,02,02);
t2 = datetime(2010,11,11);
t1:seconds(1):t2
t1:minutes(1):t2
t1:hours(1):t2
t1:hours(3):t2
  1 个评论
pruth
pruth 2018-5-21
Aaahaaa !!! fantastic. thanks. life is so easy.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by