MATLAB: Calculate mean monthly from daily values

data miningfor loop

I have a file that is 22281 rows x 5 col. This represents 60 years of daily values. I need to calculate mean monthly values for all years and extract, say, only May, to a new file. The resulting output will be 60 values for mean monthly data for May. This will be to compare col4 to col5 (below).
col1=year
col2=month
col3=day
col4=data1
col5=data2
Please help!

Best Answer

Take a look at the solutions to this question: http://www.mathworks.com/matlabcentral/answers/27088-sort-data-by-day-of-year. You might find some ideas there that help you.