I set rng to 'default', so I expected that it'll generate new random numbers after re-running MATLAB, but that is not the case. Why? How can I get MATLAB to generate new random numbers after re-opening it?
Why does MATLAB generate identical random values after re-opening the program?
3 ビュー (過去 30 日間)
I run the code below
y = rand(1,5)
and I get the following values:
0.8147 0.9058 0.1270 0.9134 0.6324
I close MATLAB and reopen it again and enter the same code and I get the same random values. Why does MATLAB create the exact same numbers each time?