How could i generate 10000 samples of a random variable uniformly distributred in(0,1)??
Mostrar comentarios más antiguos
Dear Sir/Madam, How could i generate 10000 samples of a random variable uniformly distributred in(0,1)??
4 comentarios
Purushottama Rao
el 19 de Ag. de 2015
Editada: Purushottama Rao
el 19 de Ag. de 2015
Are you lookig for somethinglike
rand(10000,1)
HARI PRASAD
el 19 de Ag. de 2015
Walter Roberson
el 19 de Ag. de 2015
Yes.
HARI PRASAD
el 19 de Ag. de 2015
Respuestas (1)
Purushottama Rao
el 19 de Ag. de 2015
Editada: Purushottama Rao
el 19 de Ag. de 2015
In your code,loop should start form 1. i=1:1:1000
However inorder to acheieve what you have wanted, you may not need a loop.
X= rand(1,10000);
Y=rand(1,10000);
k=sqrt(X.^2+Y.^2)
k is the result
Categorías
Más información sobre Random Number Generation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!