Converting serial date to regular dates

3 Ansichten (letzte 30 Tage)
Abigail Waring
Abigail Waring am 22 Mär. 2021
Kommentiert: Abigail Waring am 22 Mär. 2021
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 Kommentare
David Hill
David Hill am 22 Mär. 2021
Show sample format of your data_all(:,1) first column
Abigail Waring
Abigail Waring am 22 Mär. 2021
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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jan
Jan am 22 Mär. 2021
plot(data_all(:,1), data_all(:,2), '-r');
datetick('x')

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by