[General Information]
Function Name=GaussCum
Brief Description=Non-Linear Gaussian Cumulative Function
Function Source=fgroup.GaussCum
Function Type=Built-in
Function Form=Expression
Number Of Parameters=6
Number Of Independent Variables=2
Number Of Dependent Variables=1
Analytical Derivatives for User-Defined=Off


[Fitting Parameters]
Naming Method=User-Defined
Names=z0,B,C,D,E,F
Meanings=?
Initial Values=--(V)
Lower Bounds=--(X, OFF)
Upper Bounds=--(X, OFF)
Number Of Significant Digits=


[Formula]
 z = z0 + 0.25*B*(1 + erf((x - C)/(sqrt(2)*D)))*(1 + erf((y - E)/(sqrt(2)*F)));


[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;

vector coeff;
fitpoly( x_z_curve, 2, coeff );
double dZmin, dZmax;
x_z_curve.GetMinMax(dZmin,dZmax);

if(coeff[2]>0)
{
	z0 = dZmin;           
	B =  dZmax - z0;                 
}
else
{	
	z0 = dZmax;
	B = dZmin - dZmax;	
}
	C =  xaty50(x_curve);   
	E =  xaty50(y_curve);  
	D =  abs(xatymax(x_curve)-xatymin(x_curve))/2;               
	F =  abs(xatymax(y_curve)-xatymin(y_curve))/2;

[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>


