MATLAB: How to specify time and months for year long data

.

Best Answer

Let data - your array first column - 'year', second - 'month' ... fifth - 'temp'
[de, ~,c] = unique(data(:,1:2),'rows');
out2 = accumarray(c,data(:,5),[],@(x){[mean(x),min(x),max(x)]});
out = [de, cat(1,out2{:})];
for your array from seattle_tdry.txt only:
f = fopen('seattle_tdry.txt'); c = textscan(f,'%f %f %f %f'); fclose(f);
out2 = accumarray(c{1},c{4},[],@(x){[mean(x),min(x),max(x)]});
out = [unique(c{1}), cat(1,out2{:})];