Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
abreiti
Posted - 11/29/2006 : 06:01:56 AM Hello!
I want to calculate the sum of every point of a layer with different datasets: 1. I count all datasets 2. I build a new worksheet 3. I build a for-loop over all datasets 4. I want to add all datasets to column 1
Here's my LabTalk-Script - that doesn't work:
layer -c; //count all datasets win -t wks; //new worksheet for (ii=1;ii<=count;ii++) { col(1) = col(1) + %[%z,#$(ii)]; };
Maybe somebody can help.
1 L A T E S T R E P L I E S (Newest First)
Mike Buess
Posted - 11/29/2006 : 07:24:25 AM It doesn't work because col(1) has no values to begin with and adding anything to a missing value yields a missing value. Try this...
layer -c; //count all datasets win -t wks; //new worksheet; col(1)=%[%Z,#1]; for (ii=2;ii<=count;ii++) { col(1) = col(1) + %[%z,#ii]; };