Hourly averages over a 20yr time series
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Steven Lord
am 10 Mär. 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?
Antworten (2)
Sargondjani
am 10 Mär. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Dates and Time finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!