moving window with 30-year data
2 ビュー (過去 30 日間)
古いコメントを表示
Hello, I have a matrix of time series data as attached. Time series lengths from 1970-2012. I need to extract moving block of 30-year window from this, with moving a year on every-time step. For example, the first block from 1970-2009, 2nd block 1971-2010, 1972-2011, and so on.
so something like this:
for i=size(unique(matrix(:,1),1)
30_yrblock = [my timeseries]
do whatever calculation with 30-year window
Result(i,:) = [];
end
However, I am not sure how to do so. Any help please?
Thanks!
0 件のコメント
回答 (1 件)
Steven Lord
2017 年 10 月 16 日
Use the movmean function with the SamplePoints option. See the "Sample Points for Moving Average" example on that documentation page.
参考
カテゴリ
Help Center および File Exchange で Descriptive Statistics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!