|
From: Peter J. <pet...@gm...> - 2012-01-16 15:41:48
|
On Mon, Jan 16, 2012 at 10:50 AM, <pl...@pi...> wrote:
> Hi,
>
> I am wanting to run fit on each section of a long, indexed datafile.
> While the symmetry of the syntax between plot and fit means this is
> syntactically possible, it is in fact useless since only the final
> fitted parameters are retained.
> [...]
With the soon-to-be-released new version it is possible to do the following:
do for [i=0:10] {
fit a*x+b 'data.dat' index i via a,b
# do whatever you want with a,b, for example
eval(sprintf("a_%d=a;b_%d=b",i,i))
}
Péter Juhász
}
|