dates in x axis plot

6 visualizzazioni (ultimi 30 giorni)
Fabio Ambrosini
Fabio Ambrosini il 24 Giu 2021
Risposto: KSSV il 24 Giu 2021
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?

Risposta accettata

KSSV
KSSV il 24 Giu 2021
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)

Più risposte (0)

Categorie

Scopri di più su Dates and Time in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by