function [lpccoef]=lpc1(x,r)
%Auto correlation  method
for i=1:1:r
    for j=1:1:r
    temp1=[zeros(1,i) x];
    temp2=[zeros(1,j) x];
m= max(size(temp1,2),size(temp2,2));
temp1=[temp1 zeros(1,m-length(temp1)+1)];
temp2=[temp2 zeros(1,m-length(temp2)+1)];
C(i,j)=sum(temp1.*temp2)
 end
end
for k=1:1:r
temp=[zeros(1,k) x];
x=[x zeros(1,k)];
C1(k)=sum(temp.*x);
end,
lpccoef=pinv(C)*C1';
lpccoef=[1; -1*lpccoef];

