Re: Limits to a fitting curve
- From: Christoph Bersch <usenet@xxxxxxxxxx>
- Date: Fri, 29 May 2009 11:18:10 +0200
Stefan Brinker schrieb:
Christoph Bersch schrieb:Stefan Brinker schrieb:with the fitting, done like this:Just change your plot command to
f(x)=a*x**3+b*x**2+c*x+d
a=1; b=1; c=1; d=1
fit f(x) 'test1.DAT' using 1:2 via a,b,c,d
plot [600:1000] 'test1.DAT' using 1:2 title 2, f(x)
Is it possible to set limits to the x-values of the fitting curve? I don´t need the curve to cover the whole 600-1000, only the area of the measured data (630-900) should be covered.
plot [630:900] ...
Christoph
Sadly this is not possible because there are other measuring curves which cover the area of 600:1000 and all graphs have to be from 600 to 1000, so they are comparable.
Ok, now I know what the problem is.
You can do it like this:
f(x)=a*x**3+b*x**2+c*x+d
a=1; b=1; c=1; d=1
fit f(x) 'test1.DAT' using 1:2 via a,b,c,d
F(x) = (x < 630 || x > 900) ? NaN : f(x)
plot [600:1000] 'test1.DAT' using 1:2 title 2, F(x)
However, I don't know if this is the most elegant way.
Isn´t it possible to cut off the fitting curve at some value?
I don't know if it would make sense (and if its possible) to allow a range specification for every function that is plotted and then take the range that includes all 'subranges' to plot the functions:
plot [0:10] f(x), [-2:8] g(x)
gives a plot for [-2:10]
Christoph
.
- Follow-Ups:
- Re: Limits to a fitting curve
- From: Stefan Brinker
- Re: Limits to a fitting curve
- From: Stefan Brinker
- Re: Limits to a fitting curve
- References:
- Re: Limits to a fitting curve
- From: Christoph Bersch
- Re: Limits to a fitting curve
- From: Stefan Brinker
- Re: Limits to a fitting curve
- Prev by Date: Re: Limits to a fitting curve
- Next by Date: Re: Limits to a fitting curve
- Previous by thread: Re: Limits to a fitting curve
- Next by thread: Re: Limits to a fitting curve
- Index(es):
Relevant Pages
|