Origin Ver. and Service Release (Select Help-->About Origin): b9.4.0.220 Operating System: Windows Vista (64-bit)
Hello I am using labtalk to fit my data and adjust the slope.
I tried the following script to approach a slope of ~0.
double XX = 0; col(h)=col(g)*XX; fitLR (1,9) N:=10; double slope = fitLR.b;
loop(ff,1,100){ if(slope>0){ XX+=5E-6; col(h)=col(g)*XX; fitLR (1,9) N:=10; slope = fitLR.b; } }
However, when I print the slope, it appears that the slope from the fit inside the loop stays the same for all iterations even though the plotted slope clearly changes.
The problem is, that the adjustment of the slope wont stop at the desired point.
Cheers, Peter |