cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar

Set random seed of function Random Shuffle

Hello

 

I'm using the Random Shuffle function, but I'd like to set the random seed so that I can reproduce certain results. The random seed function alone doesn't seem to apply, so how do I go about it?

 

Names Default To Here( 1 );
Random Seed( 123 ); // Fix random seed
exA = [1 2 6, 3 5 8];
Random Shuffle( exA );
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Set random seed of function Random Shuffle

Try with Random Reset(123) instead of Random Seed(123)

Names Default To Here(1);
Random Reset(1);
exA = [1 2 6, 3 5 8];
Random Shuffle(exA);

Random Reset(seed) 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Set random seed of function Random Shuffle

Try with Random Reset(123) instead of Random Seed(123)

Names Default To Here(1);
Random Reset(1);
exA = [1 2 6, 3 5 8];
Random Shuffle(exA);

Random Reset(seed) 

-Jarmo

Re: Set random seed of function Random Shuffle

Thank you !!! It solved my issue !

Recommended Articles