function [a,b]=linr(X,Y);
[w,len]=size(X);
a=0;
b=0;
S20=sum(X.*X);
S11=sum(X.*Y);
S02=sum(Y.*Y);
S10=sum(X);
S01=sum(Y);

nom= (S10*S10-S20*len);
nom
if (abs(nom) > 1)
	a=(S10*S01-S11*len);
	a=a/nom;

	b=(S10*S11-S20*S01);
	b=b/nom;

end;
end;
