A few things:
- are you sure the function is
f(x) = a/(b**2 + x**2)**3/2 and not f(x) = a/(b**2 + x**2)**(3/2), mind the parentheses around (3/2).
- gnuplot has integer division (a common pitfall for unexpected results), hence,
(3/2) will be evaluated to 1 instead of the expected 1.5.
- why not letting gnuplot find the offset? Just introduce a variable
c which will account the x-offset and let it fit.
- depending on your model, i.e. if the exponent is variable, you could also add a variable
d for the exponent and let it find by the gnuplot fitting algorithm.
- sometimes it's better if you help the fitting with good starting values.
Then you have to judge whether the fitted values are making sense or not, e.g. b<0 or d=0.794 ...
Code:
### fitting with finding x-offset automatically
reset session
$Data <<EOD
B x(cm)
24.5 4.2
25.5 4.5
26.5 5.0
27.5 5.4
28.5 5.9
29.5 6.6
30.5 7.2
31.5 7.9
32.5 8.6
33.5 9.3
34.5 10.0
35.5 10.5
36.5 10.9
37.5 11.1
38.5 11.1
39.5 10.8
40.5 10.3
41.5 9.8
42.5 9.2
43.5 8.4
44.5 7.7
45.5 7.1
46.5 6.4
47.5 5.9
48.5 5.4
49.5 5.0
50.5 4.6
51.5 4.2
EOD
f1(x) = a1/(b1**2 + (x-c1)**2)**(3/2)
f2(x) = a2/(b2**2 + (x-c2)**2)**(3./2)
f3(x) = a3/(b3**2 + (x-c3)**2)**d3
set fit quiet nolog
fit f1(x) $Data u 1:2 via a1,b1,c1
fit f2(x) $Data u 1:2 via a2,b2,c2
a3=11; b3=1; c3=40; d3=1.5 # sometimes it's better to help the fitting with some good starting values
fit f3(x) $Data u 1:2 via a3,b3,c3,d3
print sprintf("% 9s% 9s% 9s% 9s","a","b","c","d")
print sprintf("%9.3g %9.3g %9.3g",a1,b1,c1)
print sprintf("%9.3g %9.3g %9.3g",a2,b2,c2)
print sprintf("%9.3g %9.3g %9.3g %9.3g",a3,b3,c3,d3)
plot $Data u 1:2 w p pt 7,\
f1(x) w l lc "red",\
f2(x) w l lc "web-green", \
f3(x) w l lc "web-blue"
### end of code
Result:
a b c d
1.17e+03 10.3 37.9
2.73e+04 -13.6 37.9
343 8.66 37.9 0.794
