Hourly averages over a 20yr time series
Mostrar comentarios más antiguos
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 comentarios
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?
Ross O'Connell
el 11 de Mzo. de 2021
Respuestas (2)
Star Strider
el 10 de Mzo. de 2021
1 voto
Sargondjani
el 10 de Mzo. de 2021
0 votos
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
Categorías
Más información sobre Timetables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!