How to take monthly of time series using loop I am having data form each month( having 30/31) data values
古いコメントを表示
How to take monthly average from each month using loop, and in one year there should be 12 values
2 件のコメント
Adam
2014 年 9 月 17 日
Give an example of what your inputs look like otherwise it is impossible to answer. There aren't any prizes for the shortest "question" statement on the forum!
Chris Martin
2014 年 9 月 18 日
編集済み: Chris Martin
2014 年 9 月 18 日
回答 (2 件)
dpb
2014 年 9 月 17 日
1 投票
This question was just asked (again) and answered at
Andrei Bobrov
2014 年 9 月 18 日
編集済み: Andrei Bobrov
2014 年 9 月 18 日
load yourdata.mat
[ym,~,c] = unique(a(:,1:2),'rows');
s = size(a)-[0,3];
ii = repmat(c,s(2),1);
jj = repmat(1:s(2),s(1),1);
out = [ym,accumarray([ii,jj(:)],reshape(a(:,4:end),[],1),[],@mean)];
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!