Origin Ver. and Service Release (Select Help-->About Origin): 8.5.0 sr1b161 Operating System:windows I am trying to parse a raw data file of three columns: the first two are x and y values and the third is filled with segments of 0 and 1 values. I want to copy parts from the first two columns using the third column's values to discriminate which parts to copy. I use a 'for' loop with the 'copydata' x-function inside, however, when i run the script the result i get is that the copydata function only executes once (although it should be executed several times). What do i do wrong and how can i solve this problem?
Would you please paste your script here for test? May be you need to active the specific windows before executing X functions by using command in the loop:
Int airtime=600; Int basetime=120; Int peak_num=1; Range vv=col(N); //that the third column For (ii=2;ii<=vv.getsize();ii++) {if (col(N)[ii]==100000&&col(N)[ii-1]==0) {copydata irng:=col(A)[ii-basetime]:col(B)[ii+airtime] orng:=R!wcol($(peak_num));peak_num+=2}}