|
From: Patrick D. <pd...@gm...> - 2021-11-08 11:00:01
|
Hello, Here a set of data (file.asc) 0 34.42904 1 34.42924 2 34.42965 3 34.43026 4 34.43106 5 34.43207 6 34.43329 7 34.43469 8 34.43632 9 34.43814 10 34.44017 I wish to fit them with dep (x, a) = x * a I can do 1) fit Off + dep (x, slope) "file.asc" u ($1*($1+1)):2 via Off, slope and I get final sum of squares of residuals : 2.94071e-10 Off = 34.429 +/- 2.581e-06 (7.496e-06%) slope = 0.000101126 +/- 4.802e-08 (0.04749%) with Off = 34.429039486 2) set table $DATA; plot "file.asc" u ($1*($1+1)):($2) "%lf %lf" with table ; unset table fit Off + dep (x, slope) $DATA u 1:2 via Off, slope and I get final sum of squares of residuals : 1.36307e-08 Off = 34.429 +/- 1.757e-05 (5.103e-05%) slope = 0.000101045 +/- 3.27e-07 (0.3236%) with Off = 34.4290491247 Option 1) is correct, but not option 2) Why? Thanks =========================================================================== Patrick DUPRÉ | | email: pd...@gm... Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 | | Room# D114A =========================================================================== |