How to make a plot in function of timetables expressed in UTC ?

조회 수: 5 (최근 30일)
Loren99
Loren99 2021년 10월 13일
답변: Dave B 2021년 10월 13일
Hi everyone, I need to make a plot of the values in the third column in the file Dates.txt in function of the timetables UTC in AM in the second column, but I don't know how to manage with times in UTC in Matlab. Can someone help me? Thanks in advance
clc; clear all; close all;
B = load('Dates.txt');
Values = B(:,3);
time ?
plot(time,Values,'k')
xlabel('Julian Date')
ylabel('Values')

채택된 답변

Dave B
Dave B 2021년 10월 13일
It's probably easier if you use readtable instead of load, which will pull in the times automatically:
t=readtable('Dates.txt');
tt=timetable(t.Var2,t.Var1,t.Var3);
tt=renamevars(tt,'Var2','Values');
plot(tt.Time,tt.Values)
xlabel('UTC')
ylabel('Values')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by