A couple of issues
The
Column[ l ]
you specified is incorrect syntax. Column is a function (), not a matrix [] therefore it needs to be specified as
Column( l )
Next, the formula will have an issue with the value you are assigning. Given your formula, there are cases where no value will be assigned. Since a JMP formula returns the last value assigned, you need to explicitly assign a value to the formula for every case. In my version of your formula, I am using a variable X to assign your logic to. I initialize the value to a missing value, and then X is assigned by your If() logic. I then assure that the calculated value of X is the last value processed, by simply adding
x;
as the last statement in the formula.
For( k = 40, k <= 54, k += 2,
x1 = 1;
x2 = 8;
y1 = 40;
y2 = 54;
m = (y2 - y1) / (x2 - x1);
c = y2 - (m * x1);
l = (k - c) / m;
dt << New Column( "Test" || Char( k ),
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
x = .;
If( :Strobe == 1,
If(
:Tested Variable == 0 | :Tested Plane == 1,
If( Left( Right( :"x"n, Column(l) ) ),
1
) == "1",
x = 1,
Left( Right( :"x"n, (l) ), 1 ) == "0",
x = 0,
),
);
x;
)
);
)
Finally, when entering JSL into a Discussion Question, please use the icon so the JSL is easier to read by the Community Members
Jim