How to convert data points to time
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nurhidayah Zainol
le 21 Déc 2020
Réponse apportée : Steven Lord
le 22 Déc 2020
Hi, so I have this data and I want to convert the x-axis to time. Right now the x-axis represents the data point. Please help.

0 commentaires
Réponse acceptée
Steven Lord
le 22 Déc 2020
Make a datetime or duration array and call plot with that as the first data input.
v = 1:10;
x = datetime('today')+days(v);
y = v.^2;
plot(x, y)
t = hours(v);
plot(t, y)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Type Conversion 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!

