MATLAB: I wish to sum up every 12th value in a time series. I want the value from 1-12, 13 – 24 , 25-36 and so on through the whole time series.

time seriesvector

This is to extract the annual value form a monthly time series.
Can anybody help me out here?
Many thanks!

Best Answer

yrsum=sum(reshape(series,12,[]);