cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
ChrisMuenzer
Level II

How to use a variable in JSL to set the levels of a DOE factor?

I'm trying to add a factor to a DOE using a variable instead of hard coding the levels. The end goal is to provide the user with a simple interface set the levels for one of the factors.

 

The following code doesn't work and the factor just ends up with L1 and L2 as levels.

 

Names Default To Here( 1 );

levels = List(1,2,3);

d = DOE(
	Custom Design,
	Add factor(Discrete Numeric, levels)
);
d << Make Design;
d << Make Table;
2 REPLIES 2

Re: How to use a variable in JSL to set the levels of a DOE factor?

Here is an example I created interactively with a Continous factor and a Discrete Numeric factor.

levels = {1, 2, 3};

obj = DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, -1, 1, "X1", 0 )}
);

Eval(
	Substitute(
		Expr( obj << Add Factor( Discrete Numeric, LLL, "X2", 0 ) ),
		Expr( LLL ),
		levels
	)
);
GL970879
Level I

Re: How to use a variable in JSL to set the levels of a DOE factor?

Hello~

According to  the example that you created, how to use variables for the "levels", and then add a "Categorical" factor to obj?
For example:
value = "11";
value = "21";
value = "31";
levels = {value1, value2, value3};

 

Thanks!

Recommended Articles