Accumulate previous values in time serie
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Danilo M
le 20 Déc 2018
Réponse apportée : the cyclist
le 20 Déc 2018
I have a rain time series like this:
[year month day hour min rain]
2008 1 12 9 0 0
2008 1 12 10 0 0
2008 1 12 11 0 0
2008 1 12 12 0 0.2
2008 1 12 13 0 0.2
2008 1 12 14 0 1
2008 1 12 15 0 1.6
2008 1 12 16 0 2.2
2008 1 12 17 0 1.6
2008 1 12 18 0 0.8
2008 1 12 19 0 1.6
2008 1 12 20 0 0.8
2008 1 12 21 0 0.6
2008 1 12 22 0 0.6
2008 1 12 23 0 0.8
And I need to calculate rain accumulated on past 3, 6, 12, 24 and 48 hours, so, for example, for a 3-hour accumulate, the last line should sum 2 previous lines, resulting in
2008 1 12 23 0 2.0
How can I program this on MatLab?
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Dates and Time 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!