[General Information]
Function Name=Polynomial2D
Brief Description=X-Y Polynomials function
Function Source=fgroup.Polynomial2D
Function Type=Built-in
Function Form=Expression
Number Of Parameters=11
Number Of Independent Variables=2
Number Of Dependent Variables=1
Analytical Derivatives for User-Defined=Off


[Fitting Parameters]
Naming Method=User-Defined
Names=z0,A1,A2,A3,A4,A5,B1,B2,B3,B4,B5
Meanings=?
Initial Values=--(V)
Lower Bounds=--(X, OFF)
Upper Bounds=--(X, OFF)
Number Of Significant Digits=


[Formula]
//z = z0+ A1*x + A2*x^2 + A3*x^3+ A4*x^4 +A5*x^5 +B1*y + B2*y^2 + B3*y^3 + B4*y^4 + B5*y^5;

z = z0+ A1*x + A2*pow(x, 2) + A3*pow(x, 3)+ A4*pow(x, 4) + A5*pow(x, 5) 
    + B1*y + B2*pow(y, 2) + B3*pow(y, 3) + B4*pow(y, 4) + B5*pow(y, 5);


[Constraints]



[Constants]


[Parameters Initialization]
sort(x_z_curve);
sort(y_z_curve);
smooth(x_z_curve, 2);
smooth(y_z_curve, 2);
double coeff[6];
fitpoly(x_z_curve, 5, coeff);
z0 = coeff[0];
A1 = coeff[1];
A2 = coeff[2];
A3 = coeff[3];
A4 = coeff[4];
A5 = coeff[5];
fitpoly(y_z_curve, 5, coeff);
B1 = coeff[1];
B2 = coeff[2];
B3 = coeff[3];
B4 = coeff[4];
B5 = coeff[5];

[Initializations]



[After Fitting]



[On Param Change]



[Independent Variables]
x=
y=


[Dependent Variables]
z=


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


[Compile Function]
Compile=0
Compile Parameters Initialization=1
On Param Change Scripts Enabled=N/A


[Origin C Function Header]



[Origin C Parameter Initialization Header]



