/Origin 9.1 I want to compute differenc between data in column and write the data to a new column. I use loop and range variable to compute the difference as:
for(i = 1, j = 11; i<6 ; i++; j--) { range Vm=1[i]; range Vp=1[j-1]; Vp-Vm=;
col(3)=(Vp-Vm); }
It computes and displays the difference but not writing data to the column
Thanks for the suggestion but the script writes not the difference but only every second vaules of the column cells. See below
for(ii = 1, jj = 11; ii<6 ; ii++; jj--) { range Vm=1[ii]; range Vp=1[jj-1]; Vp-Vm=; col(3)[$(ii)]=col(1)[$(jj-1)-$(ii)]; }; For data in col(1) 2 6 10 14 18 22 26 30 34 38 -------------------- It should be Vp-Vm=36 Vp-Vm=28 Vp-Vm=20 Vp-Vm=12 Vp-Vm=4; -------------------- but it gives ; 34 26 18 10 2; It looks as if it picks every second cell value. Please help.