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