Hourly averages over a 20yr time series
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I have a 20yr time series of data with time values for each hour, so ~175,000 time values. I want to calculate an hourly mean for the time series, so for example on Jan 1st at 00:00:00, I will have 20 values at this time over the 20 year series and I would like to calculate the mean, and so on for each date and time. The date and time values are formatted as '01-Jan-2000 00:00:00'.
2 commentaires
Steven Lord
le 10 Mar 2021
To clarify, the first "bin" of your data would take the mean of data from the following dates and times in your time series?
dt = datetime(2000:2020, 1, 1, 0, 0, 0, 'Format', 'dd-MMM-yyyy HH:mm:ss')
And the next bin would have data from:
dt = datetime(2000:2020, 1, 1, 1, 0, 0)
and so on and so forth?
Réponses (2)
Sargondjani
le 10 Mar 2021
Its not exactly clear over which values you want to calculate the mean, but have a look at this function, that can calculate moving averages:
https://uk.mathworks.com/help/matlab/ref/movmean.html
0 commentaires
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!