clear all; n9=auread('boys.au',15281); lenn9=length(n9); if length(n9)>13280; lenn9=13280; end tkrx=lenn9/160; tkrx=floor(tkrx); er(1:round(lenn9))=0; for i=1:23, M(i)=1+(i-1)*7; end e(1:160)=0; hw1(1:320)=0; for prcss=1:tkrx, tempx=(prcss-1)*160; tempx s(1:160)=0; s=n9(tempx+1:tempx+160)'; N=160; a=lpc(s(1:N),10); tempy=(prcss-1)*10; atemp(tempy+1:tempy+10)=-a(2:11); e(1)=1; hj=az160(a,e); hw1(161:320)=hj(1:160); e(1)=0; psi(1:length(M))=0; for syc=1:length(M), for n=1:160, psi(syc)=psi(syc)+s(n)*hw1(161-M(syc)+n); end end clear epsi; epsi(length(M),length(M))=0; for syc=1:length(M), for syc2=1:length(M), for g=1:160, epsi(syc,syc2)=epsi(syc,syc2)+hw1(161-M(syc)+g)*hw1(161-M(syc2)+g); end end end epsi2=inv(epsi); gi=psi*epsi2; for syc=1:length(M), er(M(syc)+tempx)=gi(syc); end %end tekrar end clear excitation; %N=50; N=tempx/160; j=1; for i=1:N, tempi=(i-1)*160; for syc=1:length(M), excitation(j)=er(M(syc)+tempi); j=j+1; end end fid = fopen('code9-N82-EXCITATION23.bin','wb'); clear btemp; btemp=floor(atemp*10000); ctemp=floor(excitation*10000); fwrite(fid,N,'int16'); fwrite(fid,length(M),'int16'); fwrite(fid, btemp, 'int16'); fwrite(fid, ctemp, 'int16'); fclose(fid);