|
From: James R. V. Z. <jr...@co...> - 2009-01-31 15:03:03
|
Ordinarily I do fits like this:
gnuplot> fit a+b*x 'foo.dat' via a,b
I can rename the independent variable:
gnuplot> fit [t=-1:1] a+b*t 'foo.dat' via a,b
If there are two independent variables, their standard names are x and y:
gnuplot> fit a*x+b*y 'foo.dat' using 1:2:3:(1) via a,b
I can rename the first variable:
gnuplot> fit [t=-1:1] a*t+b*y 'foo.dat' using 1:2:3:(1) via a,b
I can limit the ranges of both variables:
gnuplot> fit [t=-1:1] [-2:2] a*t+b*y 'trig.dat' u 1:2:3:(1) via a,b
However, I can't rename both variables:
gnuplot> fit [t=-1:1] [u=-1:1] a*t+b*u 'trig.dat' u 1:2:3:(1) via a,b
undefined variable: t
Why not? The code reads as if this is supposed to work.
By the way, I'm looking at the fit code in hopes of implementing fits
to functions with three independent variables. If anyone has made
progress along these lines, please let me know.
- Jim Van Zandt
|