title: How to calculate yearly values from monthly data in three dimensional matrix?
body: <p>I have monthly rainfall data in three dimensional matrix and I want to calculate total annual rainfall from monthly rainfall data. 
  Three dimensional data (180 x 360 x 120), where 180 x 360  is 1 degree by 1 degree grids and 120 is number of months (for 10 years). </p>
  
  <p>Now I want to covert monthly values into years by summing the monthly values of each year (12*10=120) so that after summing my final output will be 180 x 360 x 10.
  How would I do this in matlab?</p>