Produce a Date vector starting with a desired date
Mostrar comentarios más antiguos
Dear all, I am trying to produce a date vector, which includes year and month I would like to start With July 1926, and end with December 2014. Optimally, the format should be YYYYMM.
Thank you very much in advance!
Chris
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 11 de Ag. de 2015
d1='192607'
d2='201412'
dd1=datenum(d1,'yyyymm')
dd2=datenum(d2,'yyyymm')
out=datestr(dd1:dd2,'yyyymm')
1 comentario
Christoph Meier
el 11 de Ag. de 2015
Categorías
Más información sobre Dates and Time en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!