Origin Version (Select Help-->About Origin): 7.5714(B714) Operating System:windows Xp When I fit by my new function, the programm told me "Try to fixed B1" The below is the my function(Birch-Murnaghan): y=(3/2)*B0*(x^(-7/3)-x^(-5/3))*(1+(3/4)*(B1-4)*(x^(-2/3)-1)) The data is: 0.903165736 49.743 0.921787709 37.981 0.940409683 27.382 0.959031657 17.832 0.977653631 9.22 1.014897579 -2.526 1.033519553 -11.784 1.052141527 -17.391 1.070763501 -22.404 1.089385475 -26.869
The default for defining new functions is Origin C. When defining functions using Origin C code, C language syntax needs to be followed. Thus fractions such as 3/2 are treated as integer fractions and 3/2 will be 1 and not 1.5.
The way to get around that is to define your function as: y=(3.0/2)*B0*(x^(-7.0/3)-x^(-5.0/3))*(1+(3.0/4)*(B1-4)*(x^(-2.0/3)-1)) so the computation is forced to use doubles instead of integers.
With the Equation or LabTalk script format, this is not an issue because there is no support for int and all are treated as double.