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:

(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

, and an initial value of:

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

, 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.