[General Information]

Function Name=Pow2P3 		; name show up in the select function dialog
Brief Description=Two-parameter power function
Function Type=Built-in		; source type, built-in, user-defined, external dll
Function Form=Expression	; function form;
Function Source=fgroup.Pow2P3
Number Of Parameters=2
Number Of Independent Variables=1
Number Of Dependent Variables=1


[Fitting Parameters]                        

Naming Method=user-defined
Names=a,b
Lower bounds=--,--
Upper bounds=--,--
Meanings=coefficient, power

[Independent Variables]
x = 

[Dependent Variables]
y = 

[Constants]

[Formula]
y = 1 - 1/(1+a*x)^b

[Constraints]

[Parameters Initialization]
sort( x_y_curve );
//smooth( x_y_curve, 2 );
x_y_curve=1/(1-x_y_curve);
Dataset dx;
double coeff[4];
fitpoly(x_y_curve,3,coeff);
a=coeff[0];
if(a==0)
   b=1;
else
   b=coeff[1]/a;
                               
[Initializations]

[After fitting]

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