how do I fix the seed in the trnd function
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 10 Nov. 2012
0 Stimmen
Use the rng() function before you call trnd()
2 Kommentare
Sabbas
am 10 Nov. 2012
Wayne King
am 10 Nov. 2012
0 Stimmen
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 Kommentar
Sabbas
am 10 Nov. 2012
Kategorien
Mehr zu Statistics and Machine Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!