how do I fix the seed in the trnd function
Show older comments
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
Accepted Answer
More Answers (2)
Walter Roberson
on 10 Nov 2012
0 votes
Use the rng() function before you call trnd()
2 Comments
Sabbas
on 10 Nov 2012
Wayne King
on 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.
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!