dates in x axis plot

조회 수: 20 (최근 30일)
Fabio Ambrosini
Fabio Ambrosini 2021년 6월 24일
답변: KSSV 2021년 6월 24일
I have a string vector of Dates and a vector of values that correspond to the y value. I want to have dates in x axis on the plot, how con I do?

채택된 답변

KSSV
KSSV 2021년 6월 24일
Convert your date into class datetime you can striaght away use plot.
t = datetime(2021,1,1):datetime(2021,12,31) ;
y = rand(size(t)) ;
plot(t,y)

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by