[General Information]

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


[Fitting Parameters]

Naming Method=user-defined
Names=y0,xc,A,P
Lower bounds=--,--,0.0(X,ON),--
Upper bounds=--,--,--,--
Meanings=offset,center,amplitude,power


[Independent Variables]

x = 


[Dependent Variables]

y = 


[Constants]


[Formula]
y = A*|x-xc|^P + y0

[Constraints]

[Parameters Initialization]
sort( x_y_curve );
smooth( x_y_curve );
y0=min(x_y_curve);
xc=xatymin(x_y_curve);
x_y_curve = ln(x_y_curve-y0);
Dataset dx;
x_y_curve.AttachX(dx);
dx = ln(dx-xc);
double coeff[2];
fitpoly(x_y_curve,1,coeff);
A=exp(coeff[0]);
P=coeff[1];

[Initializations]


[After fitting]


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

