How to fix my Igor Pro Project - "Variable not declared"?

Hi,

I tried to create a new fit function in my project, but now Igor always tells me, that I have an error in this procedure - Function compilation error: variable not declared.

Here is the dialogue which I can see in the procedure window. I do not know how to fix it. Can someone help me?

Function Bessel(w,x) : FitFunc
	Wave w
	Variable x

 
	//CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will
	//CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog.
	//CurveFitDialog/ Equation:
	//CurveFitDialog/ f(x) = exp(x/2)(a-1/a)                                                                                                  
	//CurveFitDialog/ End of Equation
	//CurveFitDialog/ Independent Variables 1
	//CurveFitDialog/ x
	//CurveFitDialog/ Coefficients 1
	//CurveFitDialog/ w[0] = a

 
	return exp((x/2)(w[0]-1/w[0]))
End

I would be really thankful for any help.

Regards,

Sabrina

Firstly, give your variable x another name. x, y, z, p, q, r all have special meanings in Igor. Don't use them as names for your own variables.

You also have to add the multiply symbol * between the two parentheses, and I assume both fit parameters, w[0] and w[1], should be in the equation. You have w[0] twice.

Maybe your equation should be something like this?

return exp((a/2)*(w[0]-1/w[1]))