how do I fix the seed in the trnd function
Afficher commentaires plus anciens
Dear all,
I use matlab 2012 and I want to generate values from a student t distribution. I use the function "trnd". HOw can I fix the see in this function
thanks
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 10 Nov 2012
0 votes
Use the rng() function before you call trnd()
2 commentaires
Sabbas
le 10 Nov 2012
Wayne King
le 10 Nov 2012
0 votes
Don't do that. Don't call rand('state', ) before using rng.
rng seeds the random number generator for you. Remove that from and your code and just use rng() to do the work.
1 commentaire
Sabbas
le 10 Nov 2012
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!