[General Information]

Function Name=ExpDecay1	; name show up in the select function dialog
Brief Description=Exponential Decay 1 with offset
Function Type=Built-in		; source type, built-in, user-defined, external dll
Function Form=Expression	; function form;
Function Source=fgroup.ExpDecay1
Number Of Parameters=4
Number Of Independent Variables=1
Number Of Dependent Variables=1


[Fitting Parameters]

Naming Method=user-defined
Names=y0,x0,A1,t1
Lower bounds=--,--,0.0(X,OFF),0.0(X,OFF)
Upper bounds=--,--,--,--
Meanings=offset,center,amplitude,decay constant


[Independent Variables]

x = 


[Dependent Variables]

y = 


[Constants]


[Formula]
y = y0 + A1*exp(-(x-x0)/t1)

[Constraints]


[Parameters Initialization]
y0 = min( y_data );
x0 = min(x_data);
Dataset dsX;
x_y_curve.AttachX(dsX);
dsX -= x0;
x_y_curve = ln( x_y_curve - y0 );
double coeff[2];
fitpoly( x_y_curve, 1, coeff);  
A1 = exp( coeff[0] );
t1 = -1.0 / coeff[1];

[Initializations]


[After fitting]


[Controls]
General Linear Constraints=Off
Initialization scripts=Off
Scripts After fitting=Off

