[General Information]
Function Name = Logistic5
Brief Description = Five parameters logistic function
Function Source = fgroup.Logistic5
Number Of Parameters = 5
Function Type = Built-in
Function Form = Expression
Path = 
Number Of Independent Variables = 1
Number Of Dependent Variables = 1
Analytical Derivatives for User-Defined = 0


[Fitting Parameters]
Naming Method=User-Defined
Names = Amin,Amax,x0,h,s
Meanings = Lower Asymmetry,Upper Asymmetry,X of Half Y,Hill Slope,Control Factor
Lower Bounds = --(I, Off),--(I, Off),--(I, Off),--(I, Off),0.0(X, ON)
Upper Bounds = --(I, Off),--(I, Off),--(I, Off),--(I, Off),--(I, Off)
Number Of Significant Digits = 


[Independent Variables]
x = 


[Dependent Variables]
y = 


[Formula]
y = Amin + (Amax - Amin) / (1 + (x0/x)^h )^s; 


[Initializations]


[After Fitting]


[Controls]
General Linear Constraints = 0
Initialization Scripts = 0
Scripts After Fitting = 0
Number Of Duplicates = N/A
Duplicate Offset = N/A
Duplicate Unit = N/A
Generate Curves After Fitting = 1
Curve Point Spacing = Uniform on X-Axis Scale
Generate Peaks After Fitting = 1
Generate Peaks During Fitting = 1
Generate Peaks with Baseline = 1
Paste Parameters to Plot After Fitting = 1
Paste Parameters to Notes Window After Fitting = 1
Generate Residuals After Fitting = 0
Keep Parameters = 0
Compile On Param Change Script = 1
Enable Parameters Initialization = 1


[Compile Function]
Compile = 0
Compile Parameters Initialization = 1


[Parameters Initialization]
sort(x_y_curve);
x0 = xaty50( x_y_curve );
x_y_curve = x_y_curve * ( max(x_data) - min(x_data) ) / ( max(y_data) - min(y_data) );
double coeff[2];
fitpoly( x_y_curve, 1, coeff); 
h = coeff[1];
if(x0 < 0)
	h = -h;
Amin = min(y_data);
Amax = max(y_data);
s = 1;



[Constants]


[Constraints]


[Derived Parameters]
EC50 = x0 / (10^((1/h)*log(2^(1/s) - 1)))

