Making up an array having same date and time
Afficher commentaires plus anciens
Hello, I have an array of time and want to compute elapsed time from the first element of the array. For example, I have an array of event arrival times as follows:
arrival_time =
2015 1 1 0 0 0
2015 1 1 0 0 6
2015 1 1 0 0 8
2015 1 1 0 0 8
2015 1 1 0 0 9
2015 1 1 0 0 11
2015 1 1 0 0 11
2015 1 1 0 0 12
2015 1 1 0 0 15
2015 1 1 0 0 15
2015 1 1 0 0 16
2015 1 1 0 0 18
2015 1 1 0 0 18
2015 1 1 0 0 18
2015 1 1 0 0 20
2015 1 1 0 0 23
2015 1 1 0 0 23
2015 1 1 0 0 24
2015 1 1 0 0 25
2015 1 1 0 0 26
2015 1 1 0 0 27
2015 1 1 0 0 27
2015 1 1 0 0 29
And I would like to compute elapsed time from arrival_time(1,:).
Question 1. How do I compute the elapsed time easily?
Question 2 . I am going to use the function etime(t2,t1)
t2 = arrival_time(2:end,:);
Then how do I make t1 array that has same element arrival_time(1,:) ?
Many thanks!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Dates and Time dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!