Hello, I want to calculate the resolution on satellite images and need to index new variables, but I can't go through... To learn the syntax, I tried with a simple vector (from 1 to 10), and then made a loop to create a new vector, as follows: define axis/x=1:10:1 xax let array = x[gx=xax] repeat/i=2:10:1 (\ let array_1 IF I[GX=array] EQ `i` THEN (array[i=`i`]-array[i=`i-1`]); list array, array_1) list array, array_1 X: 0.5 to 10.5 Column 1: ARRAY is X[GX=XAX] Column 2: ARRAY_1 is IF I[GX=ARRAY] EQ 10 THEN (ARRAY[I=10]-ARRAY[I=9]) ARRAY ARRAY_1 1 / 1: 1.00 .... 2 / 2: 2.00 .... 3 / 3: 3.00 .... 4 / 4: 4.00 .... 5 / 5: 5.00 .... 6 / 6: 6.00 .... 7 / 7: 7.00 .... 8 / 8: 8.00 .... 9 / 9: 9.00 .... 10 / 10: 10.00 1.000 The problem is that the new variable only gets the last value of the loop. Please, would someone help? Thanks! Paula Lamosa Nunes |