Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
hello, can any one tell me how can i generate a pseudomrandom sequence in matlab that was fixed any time i execute the program
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
hello, can any one tell me how can i generate a pseudomrandom sequence in matlab that was fixed any
0 Kommentare
Antworten (1)
the cyclist
am 18 Sep. 2012
Bearbeitet: the cyclist
am 18 Sep. 2012
If you have a relatively recent version of MATLAB, use the rng() command to fix the seed. For example, place the line
rng(1)
at the beginning of your code.
Then you can use
rand(3,1)
for example to generate three pseudorandom numbers uniformly from the interval (0,1). Functions for drawing from other distributions are also available.
0 Kommentare
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!