[General Information]

Function Name=FreundlichEXT	; name show up in the select function dialog
Brief Description=Extended Freundlich Model
Function Type=Built-in		; source type, built-in, user-defined, external dll
Function Form=Expression	; function form;
Function Source=fgroup.FreundlichEXT
Number Of Parameters=3
Number Of Independent Variables=1
Number Of Dependent Variables=1


[Fitting Parameters]

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

[Independent Variables]

x = 


[Dependent Variables]

y = 


[Constants]


[Formula]

y = a*x^(b*x^(-c))

[Constraints]

[Parameters Initialization]
sort(x_y_curve);
//smooth(x_y_curve, 2);
a=yatxmax(x_y_curve);
double midx=(min(x_data)+max(x_data))/2.0;
double xc,yc;
if(Curve_yfromX(&x_y_curve,midx)>a) 
  xc=xatymax(x_y_curve);
else
  xc=xatymin(x_y_curve);
if(xc==1) xc-=0.01*(max(x_data)-min(x_data));
yc=Curve_yfromX(&x_y_curve,xc);
c=1.0/ln(xc);
if(a==0) 
  b=1;
else   
  b=exp(1)*c*ln(yc/a);

[Initializations]


[After fitting]


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