Imput a date without getting a nan

Sorry this is really basic, I'm trying to plot wave height data from a buoy over a year and can't figure out how to input the date without getting NaN?

답변 (1개)

the cyclist
the cyclist 2022년 4월 13일

1 개 추천

DateStrings = {'2021-05-26';'2021-08-03'};
t = datetime(DateStrings,'InputFormat','yyyy-MM-dd');
waveHeight = [2 3];
figure
plot(t,waveHeight)
It is impossible to be more helpful than this, without more information about your problem.

카테고리

도움말 센터File Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

질문:

2022년 4월 13일

답변:

2022년 4월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by