Borrar filtros
Borrar filtros

How to turn datapoints into hours?

5 visualizaciones (últimos 30 días)
Rebecca Ellis
Rebecca Ellis el 2 de Sept. de 2018
Editada: Rebecca Ellis el 2 de Sept. de 2018
I have 200 datapoints which I need to turn into 50 hours, trying to replicate the picture attached. What is the best way or function for doing this?

Respuestas (1)

Walter Roberson
Walter Roberson el 2 de Sept. de 2018
t = (1:200)/50;
plot(t, y)
  1 comentario
Rebecca Ellis
Rebecca Ellis el 2 de Sept. de 2018
Editada: Rebecca Ellis el 2 de Sept. de 2018
Thank you for this answer - I was trying to use the date time function - as I need to see the hour when I zoom into the figure eg. picture
I was trying
ticlocs =
datetime(DateString);
ticlocs.Format = 'HH-MM';
set(gca, 'XTick', ticklocs);
But this is better- I was trying for a more automated way as I have lots of datasets at different lengths to convert to hours.

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by