Hi, so I have this data and I want to convert the x-axis to time. Right now the x-axis represents the data point. Please help.

 채택된 답변

Steven Lord
Steven Lord 2020년 12월 22일

0 개 추천

Make a datetime or duration array and call plot with that as the first data input.
v = 1:10;
x = datetime('today')+days(v);
y = v.^2;
plot(x, y)
t = hours(v);
plot(t, y)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

질문:

2020년 12월 21일

답변:

2020년 12월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by