function linearniRegrese(n)

x = rand(n,1);
y = 0.1*(-0.5+rand(n,1))+x;
A = [n,sum(x);sum(x),sum(x.^2)];
b = [sum(y);x'*y];
alfa = A\b;
xx = 0:0.01:1;
plot(x,y,'k*',xx,alfa(1)+alfa(2)*xx,'r',xx,xx,'b')