Hi hauli,
You are right, this seems to be a bug in NLSF labtalk object when working on partially masked data. The simplest work-around is to delete the masked data, but it is not recommended. Since the fit comparison tool is written by using Origin C, you can actually fix the bug by following the steps in below:
1. Alt+4 to open the code builder.
2. In Code Builder, browse to <Origin root folder>\OriginC\OriginLab\CompareFit.c, open it. Make sure that "Add to Workspace" is checked in "Open" dialog.
3. Right below Line 53, add the following codes:
Worksheet wks(strResWks);
wks.AddCol();
wks.AddCol();
Dataset dsDataA(strResWks, 4);
Dataset dsDataB(strResWks, 5);
dsDataA.GetName(strCurve1);
dsDataB.GetName(strCurve2);
dsDataA.SetSize(isize1);
dsDataB.SetSize(isize1+isize2);
int i;
for (i = 0; i < isize1; i++)
{
dsDataA[i] = curve1[i];
}
for (i = 0; i < isize2; i++)
{
dsDataB[isize1+i] = curve2[i];
}
4. Shift+F8 to compile CompareFit.c
5. Run Tools -> Fit Comparison again.
Pls let us know if you run into any further problem.
Leo
OriginLab Corp.
Edited by - Leo_Li on 04/05/2006 02:19:44 AM