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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by