MATLAB Answers

First Col to Rep Date in Double Array

3 views (last 30 days)
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??


Show 1 older comment
Tatte Berklee
Tatte Berklee on 2 Dec 2019
I am trying to store this into a matrix, and my matrix is in doubles. How can I resolve this issue?
Turlough Hughes
Turlough Hughes on 2 Dec 2019
As in a serial number from excel? Can you attach some of the data?
Tatte Berklee
Tatte Berklee on 3 Dec 2019
Hey Turlough, I resolved this in plot as the plot command makes the datetick possible to be adjusted. Thanks guys!

Sign in to comment.

Accepted Answer

Kavya Vuriti
Kavya Vuriti on 4 Dec 2019
You can use timetable array which associates a time with each row and then plot them against date and time using stackedplot.


Sign in to comment.

More Answers (1)

Sean de Wolski
Sean de Wolski on 2 Dec 2019
Use a timetable and stackedplot.

  1 Comment

Tatte Berklee
Tatte Berklee on 3 Dec 2019
Can you please elaborate? thanks!

Sign in to comment.

Sign in to answer this question.