Borrar filtros
Borrar filtros

Excel Date Format to Matlab Number Array

2 visualizaciones (últimos 30 días)
Franco
Franco el 27 de Feb. de 2013
I have excel data, of which one column is in excel date format of the type '02/12/2013'. When I use xlsread, matlab gives me a number. I need to get matlab to give me an array. For instance, if 2 cells contain '02/03/2013' and '02/04/2013', I want matlab to give me an array of the following type, [02,02;03,04;2013,2013]. Anyone out there know how to do that? Thanks in advance.

Respuesta aceptada

Craig Cowled
Craig Cowled el 27 de Feb. de 2013
Have you tried using datevec?
Take one of the cells as an example ... '02/03/2013'.
>> datevec('02/03/2013','mm/dd/yyyy')
ans =
2013 2 3 0 0 0

Más respuestas (0)

Categorías

Más información sobre Data Import from MATLAB 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!

Translated by