Plotting dates on the x-axis
1 回表示 (過去 30 日間)
古いコメントを表示
I have a cell with 4 columns in which the first one is a day, the second is a month, the third is a year and the fourth is an index value. I would like to know if there's a way of plotting a "timelapse" on the x-axis using the info in the first three columns and the index values on the y-axis, or do I have to modify my cell using datenum? If so, any tips on doing that? Thanks in advance, any help is very valuable!!
0 件のコメント
回答 (1 件)
darova
2021 年 4 月 6 日
Just use datenum
a = rand(5,4,3);
datenum(a(:,1),a(:,2),a(:,3))
Use sort if needed
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!