How can I change graph label linearly to a time interval

2 vues (au cours des 30 derniers jours)
Dussan Radonich
Dussan Radonich le 19 Juin 2021
Commenté : Dussan Radonich le 19 Juin 2021
I have datasets that correspond to a certain time of simulations. When I plot these datasets, the x labels, of course, shows the length of the data. I changed it with
xticks([0 1000 2000 3000])
Which is not very accurate, and wanted to know if there is a way of making the length of my data equals to 'x' nanoseconds and then adjust the ticks and labels accordingly.

Réponse acceptée

LO le 19 Juin 2021
you can create a time vector and plot it together with your data
time = linspace(1,3000,3000)
plot(time, rand(1,3000))
  1 commentaire
Dussan Radonich
Dussan Radonich le 19 Juin 2021
Got it working, thank you!

Connectez-vous pour commenter.

Plus de réponses (0)


En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by