Converting serial date to regular dates

3 ビュー (過去 30 日間)
Abigail Waring
Abigail Waring 2021 年 3 月 22 日
コメント済み: Abigail Waring 2021 年 3 月 22 日
Hi guys
I am very new to MATLAB so please bare with me.
I am combining 5 x .mat files for climate reanalysis plots.
Most of the code works but it's the converting dates line not working.
The code is:
plot(datenum(data_all(:,1)),data_all(:,2),'-r');
Now this produces the correct plot but with serial numbers. I've tried many variations to try to fix this but none are working.
Thank you in advance!
Abi
  2 件のコメント
David Hill
David Hill 2021 年 3 月 22 日
Show sample format of your data_all(:,1) first column
Abigail Waring
Abigail Waring 2021 年 3 月 22 日
7.3818
7.3818
7.3818
7.3818
7.3818
7.3818
7.3818
7.3818
7.3818
7.3818
7.3818
7.3818
7.3818
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819
7.3819

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

回答 (1 件)

Jan
Jan 2021 年 3 月 22 日
plot(data_all(:,1), data_all(:,2), '-r');
datetick('x')
  1 件のコメント
Abigail Waring
Abigail Waring 2021 年 3 月 22 日
worked perfectly thank you so much!!!

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

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by