cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

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

Combinations

Hello, I just want to ask how do i generate  6 random numbers ranging from 1 to 100 from which the user indicates the number of combinations to be generated? 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Combinations

JMP has many pseudo-random number generators. Use this one:

 

Random Integer( 1, 100 );

 

You can construct a vector with the J() function. Here is a call to produce a column vector of six random variables:

 

J( 6, 1, Random Integer( 1, 6 ) );

I am not clear what you need when you say "from which a user indicates the number of combinations to be generated."

View solution in original post

3 REPLIES 3

Re: Combinations

JMP has many pseudo-random number generators. Use this one:

 

Random Integer( 1, 100 );

 

You can construct a vector with the J() function. Here is a call to produce a column vector of six random variables:

 

J( 6, 1, Random Integer( 1, 6 ) );

I am not clear what you need when you say "from which a user indicates the number of combinations to be generated."

pawndreal_
Level I

Re: Combinations

Thanks for the reply! What i meant is that when a user indicated number of
combinations, say if i input 3 as my combinations, it returns 3 column
vectors of the random numbers generated.

Re: Combinations

I see. That need is easily handled by the second argument to the J() function.

 

J( 6, 3, Random Integer( 1, 6 ) );

You can use variables instead of constants, too.

 

r = 6;
c = 3;
J( r, c, Random Integer( 1, 6 ) );

 

Recommended Articles