1 Attachment(s)

Help with non-linear least squares

I'm trying to find least squares coefficients using the Gauss-Newton method (using scilab as my numerical analysis software)

Given the following data vectors:

x = [57.9 108.2 149.6 227.9 778.3 1429.4] ' ;

y = [0.2 0.6 1.0 1.9 11.9 29.5] ' ;

(The ' sign means transposed in scilab notation, so they are column vectors)

I'm trying to adjust the data to the following equation:

$\displaystyle y = ax^b$

(you will find this to be Kepler's third law on planetary motion)

,where a and b are the coefficients to find.

I'm using the following code to find $\displaystyle \theta = (a, b)$, and an initial value of: $\displaystyle \theta_0 = (0.000426, 1.53917)$

So here's the problem. In the first iteration, the Jacobian grows to be a very badly scaled matrix:

Attachment 20917
note that the left column is $\displaystyle x^p$, which makes for a huge number compared to the right column, making the matrix very badly scaled, so i never get to the solution.

I've tried everything from QR decomposition to logarithmic scaling, but nothing seems to work for me.

Any help will be much appreciated.