hi, how can i convert this date Thu, Sep-24-15 to a serial date number.
thanks

 Respuesta aceptada

Star Strider
Star Strider el 26 de Sept. de 2015

0 votos

This should work:
date_num = cellfun(@(x)datenum(x, 'ddd, mmm-DD-YY'), check123);

2 comentarios

AA
AA el 26 de Sept. de 2015
cellfun(@(x)datenum(x, 'ddd, mmm-DD-YY'), check123(~cellfun('isempty',check123)));
with empty lines u can use the above, thanks bro
Star Strider
Star Strider el 26 de Sept. de 2015
My pleasure.

Iniciar sesión para comentar.

Más respuestas (2)

Walter Roberson
Walter Roberson el 25 de Sept. de 2015

0 votos

datenum('Thu, Sep-24-15', 'ddd, mmm-DD-YY')
AA
AA el 26 de Sept. de 2015

0 votos

i used this code
>> date_num = cellfun(@datenum, check123, 'ddd, mmm-DD-YY');
check 123 is a cell array with one column of the dates in the format 'ddd, mmm-DD-YY'. I get the error message Input #3 expected to be a cell array, was char instead.
how can i correct this error?

Categorías

Preguntada:

AA
el 25 de Sept. de 2015

Comentada:

el 26 de Sept. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by