from cell to date
Mostrar comentarios más antiguos
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 comentarios
Jan
el 3 de Jul. de 2017
It depends on what "from '01/01/1994 01' to '01/01/1994 01'" means. Why are the two strings equal and what is the trailing "01"?
Johannes Deelstra
el 3 de Jul. de 2017
per isakson
el 4 de Jul. de 2017
Editada: per isakson
el 4 de Jul. de 2017
- See Represent Dates and Times in MATLAB
- See Convert Between Datetime Arrays, Numbers, and Text
- What do you mean by "Matlab dates" ? An array of serial date numbers or a datetime array.
- Either 00 through 23 or 01 through 24. I prefer the former because 24 will automatically be converted to 00 of the following day.
Respuesta aceptada
Más respuestas (1)
Anushi1998
el 4 de Jul. de 2017
0 votos
Use strfun and datetime functions for conversion
1 comentario
Guillaume
el 4 de Jul. de 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.
Categorías
Más información sobre Dates and Time en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!