Plotting table data with dates

13 ビュー (過去 30 日間)
jinang patel
jinang patel 2020 年 2 月 13 日
回答済み: Lei Hou 2020 年 2 月 13 日
Im trying the following, however the plot doesnt display dates correctly
A=[10/20/2019 5; 11/12/2019 6]


Lei Hou
Lei Hou 2020 年 2 月 13 日
Hi Jinang,
In your code, the first column of "A" is not a datetime. It is just numeric value calculated by using division operator (/). You should construct two variables: one for datetime, and the other for numeric data. Here is one solution to your problem.
date = [datetime(2019,10,20);datetime(2019,11,12)];
point = [5;6];
table = table(date, point);

その他の回答 (0 件)


Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by