This project has moved. For the latest updates, please go here.

Matrix.Random with Seed?

Aug 6, 2011 at 2:46 PM

Sorry, relatively new to this, I would like to generate an m*n matrix using Matrix.Random(m,n), but specify a seed, so that I always get the same random matrix each time.   Searched for random number seeding in docs, perhaps I missed it.  Any help or code snippet appreciated.


Dick Males

Aug 14, 2011 at 10:12 AM


Hi Dick,

You can call Matrix.Random(m,n,dist) where dist is an distribution class. You can initialize distribution classes with random number generators and set the seed to be the same for each one of them. I think that is the easiest way to do this.