Convert a column of dates
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Stephen Jones
el 15 de Mzo. de 2012
Comentada: Sara Mendiola
el 1 de Mzo. de 2017
I can use the datenum command for individual cells, but can not seem to apply it to a whole column. What am I doing wrong? Thanks, Stephen
0 comentarios
Respuesta aceptada
Honglei Chen
el 15 de Mzo. de 2012
try cellfun
cellfun(@datenum,...
see the doc
doc cellfun
0 comentarios
Más respuestas (1)
Jan
el 15 de Mzo. de 2012
datenum does accept a column cell:
datenum({'15-Mar-2012 23:53:23'; '15-Mar-2012 23:53:23'})
>> ans =
7.3494e+005
7.3494e+005
3 comentarios
Jan
el 16 de Mzo. de 2012
I suggest to read the documentation: help datenum, doc datenum
There you find:
datenum({'20120315'; '20120316'}, 'yyyymmdd')
Ver también
Categorías
Más información sobre Time Series Objects en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!