First Col to Rep Date in Double Array
Ältere Kommentare anzeigen
I have a beginner question.
I have an array of doubles where columns from 2 to 10 stores doubles.
But I need the first column to represent time, so I can plot them against whichever double series I need to.
I don't know exactly how to get around with this.
I have the dates in serial numbers, but when I plot them against other double series, the x-axis obviously shows numbers instead of something like 11/1/2019.
How can I solve this issue??
4 Kommentare
dpb
am 27 Nov. 2019
Convert the serial number column to datetime. plot is datetime-aware; you'll get a time axis automagically. The deprecated datenum requires using the klunky datetick function to draw the time axes; not recommended for the faint of heart.
Tatte Berklee
am 2 Dez. 2019
Turlough Hughes
am 2 Dez. 2019
As in a serial number from excel? Can you attach some of the data?
Tatte Berklee
am 3 Dez. 2019
Akzeptierte Antwort
Weitere Antworten (1)
Sean de Wolski
am 2 Dez. 2019
0 Stimmen
Use a timetable and stackedplot.
1 Kommentar
Tatte Berklee
am 3 Dez. 2019
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!