Create a matrix full of dates
Ältere Kommentare anzeigen
Hi!
I need to create a matrix whit dates, starting in a specific date, for example '2013-04-01 22:00:59', and increasing in the interval of my choosing (like 1 sec, 1 min, ...).
I need to define the last one date also.
Could anyone help me?
Thank you in advance
2 Kommentare
Muthu Annamalai
am 21 Jun. 2013
Matrices can store only numbers. However, you can create cell-arrays, and struct-arrays in MATLAB. For example, see, http://www.mathworks.com/help/matlab/matlab_external/create-cell-arrays.html?searchHighlight=cell+array.
Now you can build a date string, using the function, datestr, http://www.mathworks.com/help/matlab/ref/datestr.html?searchHighlight=datestr and you should use the input as your increment time, obtained with the function now()
HTH
JaviOBe
am 21 Jun. 2013
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Dates and Time finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!