dates in x axis plot

17 visualizaciones (últimos 30 días)
Fabio Ambrosini
Fabio Ambrosini el 24 de Jun. de 2021
Respondida: KSSV el 24 de Jun. de 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?

Respuesta aceptada

KSSV
KSSV el 24 de Jun. de 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)

Más respuestas (0)

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by