Column fillingDear 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 ) );
);
Re: Column fillingByron,
Thank you verymuch your support.
I confirmed to work script properly.
Regards,
Uribo
Re: Column fillingThe part that says, :Data1
and, :Data2
are column names of the first and second column you plan to do this opperation on.
just substitute you column names and you should be OK.
Re: Column fillingByron
I'm sorry to reply late.
Thanks for the advice.
I tried using the script you got, but I could not move it because the basic knowledge was insufficient.
Error Details are as follows.
名前が解決できません: Data1 'Data1'へのアクセスまたは評価 , :Data1/*###*/
次のスクリプトで、/*###*/の付いている部分はエラーです。
dt = Current Data Table();
d1 = :Data1/*###*/ <<GET values=""></GET>
Re: Column fillingwhen you use the get values, you get a matrix of values. In this case its pretty convenient because now we can just use matrix functions to find the minimum location. The matrix opperators do all the hard work for you.
dt=current data table();
d1=:data1<<GET values=""></GET>