Hourly averages over a 20yr time series
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Steven Lord
2021 年 3 月 10 日
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?
回答 (2 件)
Sargondjani
2021 年 3 月 10 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!