Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #316
| From | Christoph Bersch <usenet@bersch.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Multible Fits using the same fit function lead to ?false? results. |
| Date | 2011-05-18 09:54 +0200 |
| Organization | GWDG, Goettingen |
| Message-ID | <iqvtvk$2bgp$1@gwdu112.gwdg.de> (permalink) |
| References | <836a279c-e42c-4304-a7a5-6dfd90ebe7df@hd10g2000vbb.googlegroups.com> |
Hi,
On 18.05.2011 00:04, Oliver Götze wrote:
> i just noticed that using a gnuplot script like this:
> fit a0 + a1*(1/x)**2 + a2*(1/x)**4# table.dat |awk "\$1 =="10" {print 1,\$2} \
> \$1 =="10" {print 2, \$3}\
> \$1 =="10" {print 3, \$4}\
> \$1 =="10" {print 4, \$5}"'via a0,a1,a2
> print "value a0 ",a0
>
> fit a0 + a1*(1/x)**2 + a2*(1/x)**4\
> '<grep -v \# table.dat |awk "\$1 =="20" {print 1,\$2} \
> \$1 =="20" {print 2, \$3}\
> \$1 =="20" {print 3, \$4}\
> \$1 =="20" {print 4, \$5}"'via a0,a1,a2
> print "value a0 ",a0
>
> on a table.dat file like this (just an example):
> #x y1 y2 y3
> 10 12 43 42
> 20 234 324 33
> 30 3 3 3
>
> leads to false results, i have to reset (or set to zero) die
> coefficients a0, a1, a2 after/before every fit by placing
Just to make it clear: gnuplot needs initial values for the fitting
parameters. If they are not defined, they will be created with an
initial value of 1.0 (see manual). Of course, you can preset the
parameters with more adequate initial values for you problem. So, how
can gnuplot know by itself, that the values of the fitting parameters
are wrong and that they should be reset?
Of course you must reset by yourself with an explicit
a0=1.0; a1=1.0; a2=1.0;
between two independent fits.
Christoph
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Multible Fits using the same fit function lead to ?false? results. Oliver Götze <goetze.oliver@googlemail.com> - 2011-05-17 15:04 -0700 Re: Multible Fits using the same fit function lead to ?false? results. Christoph Bersch <usenet@bersch.net> - 2011-05-18 09:54 +0200 Re: Multible Fits using the same fit function lead to ?false? results. Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-05-19 01:56 +0200
csiph-web