[General Information]
Function Name=RationalTaylor
Brief Description=Taylor Series Rationals
Function Source=fgroup.RationalTaylor
Function Type=Built-in
Function Form=Expression
Number Of Parameters=10
Number Of Independent Variables=2
Number Of Dependent Variables=1
Analytical Derivatives for User-Defined=Off


[Fitting Parameters]
Naming Method=User-Defined
Names=z0,A01,B01,B02,C02,A1,A2,B1,B2,C2
Meanings=?
Initial Values=--(V)
Lower Bounds=--(X, OFF)
Upper Bounds=--(X, OFF)
Number Of Significant Digits=


[Formula]
z = (z0 + A01*x + B01*y + B02*y^2 + C02*x*y)/(1 + A1*x + B1*y + A2*x^2 + B2*y^2 + C2*x*y)


[Constraints]



[Constants]


[Parameters Initialization]


Curve x_curve, y_curve;
bool bRes = get_interpolated_xz_yz_curves_from_3D_data(x_curve, y_curve, x_data, y_data, z_data);
if(!bRes) return;
 
double dMin, dMax;
x_curve.GetMinMax(dMin, dMax); 
z0 = dMin;

vector vCoeff1, vCoeff2;
fitpoly(x_curve, 2, vCoeff1);
fitpoly(y_curve, 2, vCoeff2);

A01 = vCoeff1[1];
B01 = vCoeff2[1];
B02 = vCoeff2[2];
C02 = vCoeff2[2];

A1 = vCoeff1[1];
B1 = vCoeff2[1];
A2 = vCoeff1[2];
B2 = vCoeff2[2];
C2 = 0.5*(A2 + B2);


[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]
#include <origin.h>
#include <Nag_utils.h>


