How to write datetime in a plot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Diego
am 31 Jan. 2014
Kommentiert: Mischa Kim
am 13 Feb. 2014
I want to read a file.csv but my problem is that i don't know how can I represent in a plot the hour.
My goal is to represent a number as a datetime but I don't Know if it's possible to convert it as in the next example:
131212 --> HH:MM:SS --> 13:12:12
And then put this number in that format in an x-axis in a plot.
Thanks!!!
0 Kommentare
Akzeptierte Antwort
Mischa Kim
am 31 Jan. 2014
Bearbeitet: Mischa Kim
am 31 Jan. 2014
This should do:
T0 = '131212';
T0Vec = [2000,0,0,str2double(T0(1:2)),str2double(T0(3:4)),str2double(T0(5:6))];
T0Str = datestr(T0Vec,'HH:MM:SS');
14 Kommentare
Mischa Kim
am 13 Feb. 2014
Hello Diego. Good to see you again. Would you mind opening another question? It is not really on the topic of your original question, which would make it challening to find for other users. Plus this thread is getting kind of long.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!