How to efficiently create a matrix of random numbers generating independently?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I want to have a 100-by-2000 matrix of random numbers. Each column of random numbers is generated by an independent stream. It means there should be 2000 independent streams.
I learn from "Help: Create three independent streams"
[s1,s2,s3] = RandStream.create('mrg32k3a','NumStreams',3);
r1 = rand(s1,100000,1); r2 = rand(s2,100000,1); r3 = rand(s3,100000,1);
It is very easy with 3 independent streams.
How can I efficiently create this matrix of random numbers from 2000 independent streams?
Thank you!
3 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Random Number Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!