Kevin <kel...@am...> writes:
> Hello All
>
> I would like to generate data for a curve fit within gnuplot. something like
> this:
>
> y=f1(x)
>
> where f1(x) is a known function. I would then like to define a curve fit
> function
>
>
> f2(x) = a*x*x+b*x+c
>
> and fit it to the x, y data and I define above.
>
> fit f2(x) x,y via a, b, c
>
> Is there a way to do this withing gnuplot? It seems that I would need to
> define an array of x values for f1 and I could find anything in the manual.
>
You can use the 'table' terminal to generate a table of samples of f1()
to a file, and then you can use the existing fit to fit that file to f2()
Another option might be to create generate a dummy file containing
pairs of x and 0, and then fit f2(x) - f1(x) against this file.
(does that work ?)
dd
--
Dave Denholm <dde...@es...> http://www.esmertec.com
|