How to do a 12-month average computation loop

So I have this data right here which spans from 2010 to 2014. I am trying to obtain the average of a 12month span.
For example, I am trying to obtain the 3rd column's average from Jan 2010~Dec 2010, then put the average on a row of a new matrix.
Next, I want to obtain the 3rd column's average from Feb 2010~Jan 2011, and put it on the new matrix's second row... and on.
Does anybody have an idea how to do this loop? I have a portion of my code but it is close to nil.
2039 40297.9168600000 2.60000000000000 2010 4
2009 40298.4671200000 1.40000000000000 2010 4
2151 40300.5642100000 0.900000000000000 2010 5
2144 40300.8513400000 2 2010 5
2135 40302.3340300000 1.20000000000000 2010 5

답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2015년 11월 10일

편집:

2015년 11월 10일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by