title: Using Matlab to average daily data (rasters) to monthly averages
body: <p>I have 2192 rasters representing daily timestep climate data (1 jan 2008-31 mar 2013), which I would like to aggregate into monthly means (i.e average all the data within a given month&amp;year). </p>
  
  <p>I can load the data into Matlab fine to create a 3D matrix, of size 110x57x2192. The 2192 represents time dimension from jan 2008-31 to 31 mar 2013. </p>
  
  <p>I have tried this using numbering in excel, but I am not sure how to set the syntax right. The monthly means should idealy replace the imported daily data in the memory. My numbering in Excel has four columns: date,day, month and year. Any NA pixel is ignored and the average for the pixel based on non NA pixels for a given month. </p>
  
  <pre><code>%create monthly averages from daily data
  numbering = xlsread('Numbering.xslx', B1:D2192);
  month=numbering(:,2);
  years=unique(year);
  </code></pre>
  
  <p>Here is the first three and last three row of my excel file for numbering  </p>
  
  <p>1/01/2008   1   1   2008<br>
  2/01/2008   2   1   2008<br>
  3/01/2008   3   1   2008<br>
  29/12/2013  29  12  2013<br>
  30/12/2013  30  12  2013<br>
  31/12/2013  31  12  2013<br>
  31/12/2013  31  12  2013 </p>