
%averages every p rows of x into 1
p=6;

x2ac01 = avp(x1ac01,p);
x2ac02 = avp(x1ac02,p); 
x2ac03 = avp(x1ac03,p);
x2ac04 = avp(x1ac04,p);
x2ac05 = avp(x1ac05,p); 
x2ac06 = avp(x1ac06,p);
x2ac07 = avp(x1ac07,p);
x2ac08 = avp(x1ac08,p); 
x2ac09 = avp(x1ac09,p);
x2ac10 = avp(x1ac10,p);
x2ac11 = avp(x1ac11,p); 
x2ac12 = avp(x1ac12,p); 
x2ac13 = avp(x1ac13,p); 
x2ac14 = avp(x1ac14,p); 
x2ac15 = avp(x1ac15,p); 
x2ac16 = avp(x1ac16,p); 
x2ac17 = avp(x1ac17,p); 
x2ac18 = avp(x1ac18,p); 
x2ac19 = avp(x1ac19,p); 
x2ac20 = avp(x1ac20,p); 
x2ac21 = avp(x1ac21,p); 
x2ac22 = avp(x1ac22,p); 

x2dc01 = avp(x1dc01,p);
x2dc02 = avp(x1dc02,p); 
x2dc03 = avp(x1dc03,p);
x2dc04 = avp(x1dc04,p);
x2dc05 = avp(x1dc05,p); 
x2dc06 = avp(x1dc06,p);
x2dc07 = avp(x1dc07,p);
x2dc08 = avp(x1dc08,p); 
x2dc09 = avp(x1dc09,p);
x2dc10 = avp(x1dc10,p);
x2dc11 = avp(x1dc11,p); 
x2dc12 = avp(x1dc12,p); 
x2dc13 = avp(x1dc13,p); 
x2dc14 = avp(x1dc14,p); 
x2dc15 = avp(x1dc15,p); 
x2dc16 = avp(x1dc16,p); 
x2dc17 = avp(x1dc17,p); 
x2dc18 = avp(x1dc18,p); 
x2dc19 = avp(x1dc19,p); 
x2dc20 = avp(x1dc20,p); 
x2dc21 = avp(x1dc21,p); 
x2dc22 = avp(x1dc22,p); 

x2ad01 = avp(x1ad01,p);
x2ad02 = avp(x1ad02,p); 
x2ad03 = avp(x1ad03,p);
x2ad04 = avp(x1ad04,p);
x2ad05 = avp(x1ad05,p); 
x2ad06 = avp(x1ad06,p);
x2ad07 = avp(x1ad07,p);
x2ad08 = avp(x1ad08,p); 
x2ad09 = avp(x1ad09,p);
x2ad10 = avp(x1ad10,p);
x2ad11 = avp(x1ad11,p); 
x2ad12 = avp(x1ad12,p); 
x2ad13 = avp(x1ad13,p); 
x2ad14 = avp(x1ad14,p); 
x2ad15 = avp(x1ad15,p); 
x2ad16 = avp(x1ad16,p); 
x2ad17 = avp(x1ad17,p); 
x2ad18 = avp(x1ad18,p); 
x2ad19 = avp(x1ad19,p); 
x2ad20 = avp(x1ad20,p); 
x2ad21 = avp(x1ad21,p); 
x2ad22 = avp(x1ad22,p); 

x2pd01 = avp(x1pd01,p);
x2pd02 = avp(x1pd02,p); 
x2pd03 = avp(x1pd03,p);
x2pd04 = avp(x1pd04,p);
x2pd05 = avp(x1pd05,p); 
x2pd06 = avp(x1pd06,p);
x2pd07 = avp(x1pd07,p);
x2pd08 = avp(x1pd08,p); 
x2pd09 = avp(x1pd09,p);
x2pd10 = avp(x1pd10,p);
x2pd11 = avp(x1pd11,p); 
x2pd12 = avp(x1pd12,p); 
x2pd13 = avp(x1pd13,p); 
x2pd14 = avp(x1pd14,p); 
x2pd15 = avp(x1pd15,p); 
x2pd16 = avp(x1pd16,p); 
x2pd17 = avp(x1pd17,p); 
x2pd18 = avp(x1pd18,p); 
x2pd19 = avp(x1pd19,p); 
x2pd20 = avp(x1pd20,p); 
x2pd21 = avp(x1pd21,p); 
x2pd22 = avp(x1pd22,p); 



