Hi Steffi,
You can type “integ1 -d” in the Script Window to open the Integrate dialog.
You will find that you can only specify the whole XY range in Integral Curve Data item (oy) instead of the column subrange. Thus, the new result of integration will cover on the old one. As a workaround, I think you could output the result to the separate columns and then combine the columns into one.
int nrows = wks.nrows;
jj=1;
for (ii = 1; ii <= nrows ; ii++)
{
if( col(C)[$(ii)] > 1 )
{
integ1 iy:=(col(A)[jj:ii-1],col(B)[jj:ii-1]);
jj = ii;
}
}
integ1 iy:=(col(A)[jj:nrows],col(B)[jj:nrows]);
int ncols = wks.ncols;
for(ii = 5; ii <= ncols; ii++)
{
copy -a col($(ii)) col(4);
}
wreducerows irng:=col(4) method:=missing;
Hope it helps.
Regards,
Yuki
OriginLab