Hi Andreas,Thanks for the second post. I verified everything that you reported although I am sure that there is no bug involved...Origin is mathematically correct in everything that was done.
So, I copy/pasted your raw (un-logged data) into a worksheet named Data1 containing columns A(X) and B(Y) and ran the following script:
get Data1_A -e npts;
area=0;
for(ii=2;ii<=npts;ii++) {
yy1=Data1_B[ii-1];
xx1=Data1_A[ii-1];
yy2=Data1_B[ii];
xx2=Data1_A[ii];
slope=(log(yy2)-log(yy1))/(log(xx2)-log(xx1));
if(slope==-1) {temp=xx1*yy1*ln(xx2/xx1);}
else {temp=yy1/(slope+1)*((xx2/xx1)^slope*xx2-xx1)};
area=area+temp;
};
area=;
The script is not pretty but it works. It essentially implements your formula. We generally don't provide complete scripts but this was easy enough to do given your formula. All I did was add the for loop and change your variable names. X1, X2, Y1, and Y2 are reserved system variables in Origin.
The script typed out the correct result in the script window:
AREA=69.65484855105967
I hope this is helpful.
-Gary
[This message has been edited by Gary Lane (edited 02-07-2000).]