dates in x axis plot

19 ビュー (過去 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 Center および File ExchangeDates and Time についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by