% Run LeastSq.m first

close all

D = 10*rand(2,10);
[v,x,y] = LeastSq(1,D)

[v,x,y] = LeastSq(1,D)

xx = 0:10; yy = v(1) + v(2)*xx;

figure; hold on; 
plot(D(1,:),D(2,:),'.b')
plot(xx,yy,'r-');


