[General Information]

Function Name=Poly4 	; name show up in the select function dialog
Brief Description=4th order Polynomial function
Function Type=Built-in		; source type, built-in, user-defined, external dll
Function Form=Expression	; function form;
Function Source=fgroup.Poly4
Number Of Parameters=5
Number Of Independent Variables=1
Number Of Dependent Variables=1


[Fitting Parameters]                        

Naming Method=user-defined
Names=A0,A1,A2,A3,A4 
Lower bounds=--,--,--,--,--
Upper bounds=--,--,--,--,--
Meanings=offset, cofficient, cofficient, cofficient, cofficient

[Independent Variables]
x = 

[Dependent Variables]
y = 

[Constants]

[Formula]
y = A0 + A1*x + A2*x^2 + A3*x^3 + A4*x^4

[Constraints]


[Parameters Initialization]
sort( x_y_curve );
//smooth( x_y_curve, 2 );
double coeff[5];
if (!fitpoly( x_y_curve, 4, coeff))
{
	nErr = -1;
	return;
}
A0 = coeff[0];
A1 = coeff[1];
A2 = coeff[2];
A3 = coeff[3];
A4 = coeff[4];

[Initializations]

[After fitting]

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