Bugs: Browse | Submit New | Admin

[#28908] Provided example for non-linear least squares fits does not work

Date:
2011-02-03 22:17
Priority:
3
Submitted By:
Vincent Fourmond (fourmond)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Provided example for non-linear least squares fits does not work

Detailed description
The example given in nonlinearfit.html (paragraph 8.1) does not work, at least as far as version 1.14.3 is concerned
(I didn't have a chance to take a look at the .5 version).

Attached is a version that does.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2011-04-05 16:52
Sender: Yoshiki Tsunesada

It looks running perfect. What's wrong with the script?

yoshiki@hastings[23] ruby test_gsl_leastsquares.rb
iter: 0 x =      1.00000000      0.00000000      0.00000000 |f(x)|
= 117.749
iter: 1 x =      1.52223970      0.01204385      0.52223970 |f(x)|
= 84.6007
iter: 2 x =      2.00812827      0.04430986      1.48879929 |f(x)|
= 73.2149
iter: 3 x =      3.52117634      0.06629985      0.94957045 |f(x)|
= 30.702
iter: 4 x =      4.80654030      0.10317119      1.07774335 |f(x)|
= 11.817
iter: 5 x =      5.03712230      0.10408189      1.02410822 |f(x)|
= 10.3668
iter: 6 x =      5.03731855      0.10405357      1.02411625 |f(x)|
= 10.3668
A      = 5.03732 +/- 0.06147
lambda = 0.10405 +/- 0.00216
b      = 1.02412 +/- 0.01342

Attached Files:

Name Description Download
test_gsl_leastsquares.rb Download

Changes:

Field Old Value Date By
File Added5144: test_gsl_leastsquares.rb2011-02-03 22:17fourmond