Dear JSL Masters,
By operating the JSL, you can check the number of the minimum difference between Data 1 and Data 2.
My question is hereafter.
For example, if the fourth is the minimum value, I would like to be able to fill 22 in the SNumber column created by JSL.
(22 is the forth in data1.)
I tried to write the following description, but failed to execute the script. Is there a good way to do that?
:SNumber [i]=Column( "A")[:SNumber [I]] ;
Sorry for the basic question and thank you for your support.
Uribo
Names Default To Here( 1 );
dt1 = open("C:\Users\Desktop\Data1.jmp");
temp = Column( "A" ) << Get Values;
dt2 = open("C:\Users\Desktop\Data2.jmp");
temp2 = Column( "B" ) << Get Values;
Row = N Row( dt1 );
dt2 << Add Multiple Columns( "SNumber", 1, numeric );
a = 0;
For( i = 1, i <= Row, i++,
a = temp[i];
b = 0;
diff_list = {};
For( j = 1, j <= Row, j++,
b = temp2[j];
Insert Into( diff_list, a - b );
);
Show( diff_list, Min( diff_list ) );
:SNumber[i] = Loc( diff_list, Min( diff_list ) );
);