function [R]=autocorr(x)
long=length(x);
for i=(1:long)
	x1=x(1:(long-i+1));
	x2=x(i:long);
	R(i)=sum(x1.*x2);
end
