reglin(1)

NAME
reglin - Linear regression

CALLING SEQUENCE
[a,b,sig,]=reglin(x,y,[disp])

DESCRIPTION
solve the regression problem y=a*x+b sig is the ``ecart type'' of the residual. x and y are two matrices x=[x(1),....,x(n)], y=[y(1),....,y(n)] where n must be the same but the size of x(i) and y(i) can be different.

EXAMPLE
x=rand(5,100);
aa=matrix('magi',5);
aa=aa(1:3,:);
y=aa*x;
y=y+9.87*ones(y);
[a,b]=reglin(x,y);
maxi(abs(aa-a))
maxi(abs(9.87*ones(b)-b))