MATLAB [Matlab] How to save the obtained values.

  • Thread starter Thread starter hurryon
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
The discussion centers on the need to save random variables generated during simulations to ensure reproducibility of results. The user expresses concern that running the same code multiple times yields different outcomes due to the randomness involved. The suggested solution is to write the random values to a file for future reference, allowing for consistent results in subsequent simulations. This approach is likely to benefit others facing similar challenges in their simulation work.
hurryon
Messages
9
Reaction score
2
Hi, all.

I have performed some simulations in where random variables are used. Through the simulations, I got the final results as well as some figures. Here, I have a question. The obtained results and figures are based on the calculation with randomly created values. If I perform again with the same code, I'll get different results and figures. Thus, I'd like to save the current random values. How to save these ones?

I think that other folks might have similar experiences with me.

Thanks in advance.
 
Physics news on Phys.org

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K