Hi I am trying to fit my histogram data with a gaussian model and am encountering two problems:
- I can't seem to fit the histogram data with a model
fit y(x) 'bin.txt' using 2:xtic(1) via a,b,c (error: need 2 to 7 using specs) - Even when I manually guess the correct parameters for my fit and try to plot both the curve and histogram at the same time, only the histogram shows up
My data is:
#Bin Frequency
86 0
90 1
94 4
98 4
102 7
106 6
110 5
114 9
118 4
122 5
126 3
130 1
134 0
138 1
y(x)=a*exp(-((x-b)/c)**2)
a=9.0; b=110.0; c=7.07
plot y(x), 'bin.txt' using 2:xtic(1) (only the histogram is displayed)
Any advice would be helpful, thanks.