function cr=corr2(A,len);
[r,c]=size(A)
cr(len)=0;
for jo=1:len;
	cr(jo)=sum(sum(A(1:r-jo+1,:).*A(jo:r,:))');
end;
for jo=2:len;
cr(jo)=cr(jo)*r/(cr(1)*(r-jo+1));
end;
cr(1)=1;
end;
