##
Discrete Least Square Fit to a straight line

Here is a script
that solves a linear system of size 2 (using Gauss Seidel)
to fit the following data to a straight line with a least square qpproximation.

xdata = [1 2 3 4 5 6 7 8 9 10]

ydata = [1.71 3.43 5.05 6.81 8.4 10.14 11.99 13.53 15.2 17.05]

The result is:

Number of Iterations: 32

Error: 3.877228051593549e-02