I have made a code to calculate hourly average of minute data. But it works only for single column. I have multiple column of concentration (BC) data. I want hourly average of multiple columns How can i get the desired answers. pls help.
day1bc=BC(find((date==1)));day1hour=hour(date==1);maxday1=max(day1hour);for i=1:maxday1HI= find(day1hour==i); Bcv=day1bc(HI); mean_BC_hourly1(i,:)=mean(Bcv);end
The input datas are:
day hour BC BC;1 1 10 20;1 1 20 40;1 2 30 60;1 2 40 80;1 3 50 100;1 3 60 120;1 3 70 140;
The answer expected:
BC BC;15 30;35 70;60 120;
Best Answer