from cell to date

20 Ansichten (letzte 30 Tage)
Johannes Deelstra
Johannes Deelstra am 3 Jul. 2017
Beantwortet: Guillaume am 4 Jul. 2017
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 Kommentare
Johannes Deelstra
Johannes Deelstra am 3 Jul. 2017
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 am 4 Jul. 2017
Bearbeitet: per isakson am 4 Jul. 2017

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Guillaume
Guillaume am 4 Jul. 2017
datetime(yourcellarray, 'InputFormat', 'dd/MM/yyyy HH')

Weitere Antworten (1)

Anushi1998
Anushi1998 am 4 Jul. 2017
Use strfun and datetime functions for conversion
  1 Kommentar
Guillaume
Guillaume am 4 Jul. 2017
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by