Databases Reference
In-Depth Information
// COM Bis pKa Fitting Script
// Save the name of the current Worksheet
%W = %H;
// Set Dependant Dataset
dependataset=3;
// Set Plot Template as active Window
win -a FitResult;
// Erase any Data Present in the Plot Template
lay -c;
for (ii=1; ii<=count; ii++) {
layer -e %[%Z,#ii];
};
// Initialize the nlsf engine
nlsf.init();
// Select the Custom Fitting Function
nlsf.func$=bispKa;
// initialize parameter values
Acat=%(%W,dependataset,1); //.p1
Aneut=%(%W,dependataset,4); //.p2
Aanion=%(%W,dependataset,8); //.p3
pk1 = 5;
//.p4
pk2 = 8;
//.p5
// Do Not Allow Acat or Aanion to Vary!
nlsf.v1=0;
nlsf.v3=0;
// Dependant Data (Y-Axis) to be Fit
nlsf.y$ = %(%W,dependataset);
// Independent Data (X-Axis) to be Fit
nlsf.x$ = %(%W,1);
// Total Number of Points for Fitted Curve
nlsf.xpoints = 101;
// Improve Accuracy of Fit
nlsf.tolerance = 1e-5;
// Perform Curve Fitting
nlsf.fit(20);
// Add the original Data to the plot
layer -i %(%W,dependataset);
// Rescale X & Y Axis to show All data
rescale;
%W!FitPams.v1 = $(nlsf.p4,.2);
Search WWH ::




Custom Search