g=zeros(ix-1,6);
clear inex ub ce10m ceqm cenbm zom us2m;
g(:,1)=u;
g(:,2)=wq.*rho*Le;
g(:,3)=dtx(:,12);
g(:,4)=stullx(:,3);
g(:,5)=zo;
g(:,6)=us2;
h=sortrows(g,1);
%h(1750,3)=1.4;h(1750,4)=1.4;
%h(1752,3)=1.4;h(1752,4)=1.4;

ff=1;
j=1;
for i=1:ix-1
   if floor(h(i,1))>ff
      inex(j)=i;
      j=j+1;
      ff=ff+1;
    	if j==12;ff=ff+1;end;
   end;
end;
kk=1;
for i=1:j-1
   ll=inex(i)-1;
   ub(i)=mean(h(kk:ll,1));%median(h(kk:ll,1))
   ce10m(i)=mean(h(kk:ll,2));%median(h(kk:ll,2))
   ceqm(i)=mean(h(kk:ll,3));%median(h(kk:ll,3))
   cenbm(i)=mean(h(kk:ll,4));%median(h(kk:ll,4))
   zom(i)=median(h(kk:ll,5));
   us2m(i)=median(h(kk:ll,6));
   kk=inex(i);
end;

figure;plot(ub,ce10m,'x',ub,ceqm,'o',ub,cenbm*1.15,'.');axis([0 12 0 200]);xlabel('Wind Speed (m/s)');ylabel('C_{en}');
figure;plot(wq.*rho*Le,stullx(:,3)*1.15,'.',wq.*rho*Le,wq.*rho*Le)

   