from cell to date

135 次查看(过去 30 天)
Johannes Deelstra
回答: Guillaume 2017-7-4
I have a cell variable 201624x1 with values for date from '01/01/1994 01' until '01/01/1994 01' How do I convert these into Matlab dates
Thanks
  3 个评论
Johannes Deelstra
sorry this was wrong. the time series starts at 01/01/1994 01 in which the 01 is 1 o' clock and ends at 31/12/2016 23 in which 23 is the 24 hrs midnight
per isakson
per isakson 2017-7-4
编辑:per isakson 2017-7-4

请先登录,再进行评论。

采纳的回答

Guillaume
Guillaume 2017-7-4
datetime(yourcellarray, 'InputFormat', 'dd/MM/yyyy HH')

更多回答(1 个)

Anushi1998
Anushi1998 2017-7-4
Use strfun and datetime functions for conversion
  1 个评论
Guillaume
Guillaume 2017-7-4
You probably mean cellfun. There is no strfun in base matlab. In any case, datetime can directly operate on a cell array so cellfun would not even be needed.

请先登录,再进行评论。

类别

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

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by