How to generate multiple random samples of size 200
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to generate multiple (say 1000) random samples from the normal distribution each of size 200. How do I achieve that. Thanks!
0 commentaires
Réponse acceptée
dpb
le 19 Mar 2014
rnv=randn(200,1000); % generate 1000 column samples of 200
Refer to the subsample sets as rnv(:,idx) where idx is the desired sample number. Don't even think of trying to build named variables for this.
Plus de réponses (1)
Viju
le 19 Mar 2014
One way to go about this:
x = randn(200,1000);
This generates normally distributed pseudo-random numbers between 0 and 1.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!