First Col to Rep Date in Double Array

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 件のコメント

dpb
dpb 2019 年 11 月 27 日
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
Tatte Berklee 2019 年 12 月 2 日
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 2019 年 12 月 2 日
As in a serial number from excel? Can you attach some of the data?
Tatte Berklee
Tatte Berklee 2019 年 12 月 3 日
Hey Turlough, I resolved this in plot as the plot command makes the datetick possible to be adjusted. Thanks guys!

サインインしてコメントする。

 採用された回答

Kavya Vuriti
Kavya Vuriti 2019 年 12 月 4 日

0 投票

Hi,
You can use timetable array which associates a time with each row and then plot them against date and time using stackedplot.

その他の回答 (1 件)

Sean de Wolski
Sean de Wolski 2019 年 12 月 2 日

0 投票

Use a timetable and stackedplot.

1 件のコメント

Tatte Berklee
Tatte Berklee 2019 年 12 月 3 日
Can you please elaborate? thanks!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeDates and Time についてさらに検索

製品

リリース

R2019b

質問済み:

2019 年 11 月 27 日

回答済み:

2019 年 12 月 4 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by