how do I fix the seed in the trnd function
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (2)
Walter Roberson
il 10 Nov 2012
0 voti
Use the rng() function before you call trnd()
2 Commenti
Sabbas
il 10 Nov 2012
Wayne King
il 10 Nov 2012
0 voti
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 Commento
Sabbas
il 10 Nov 2012
Categorie
Scopri di più su Statistics and Machine Learning Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!