I have a plot of a function that uses rand(0) to generate numbers between 0 and 1.
I would like to set a different random sequence each time I run the Gnuplot script.
The documentation says to uses rand(x) where x is a positive integer.
I have tried this
rand(floor(10*acos(rand(0))))
that gives an integer for each execution.
However, this line gives me an error. I have not found any example of setting the seed of rand.
How can I set a different seed each time to get different plots?
Regards
print rand(floor(10*acos(rand(0)))). That, by the way, is just a convoluted way to get a different set of identical random numbers sequence. Quit gnuplot, start it again, and you will get this new set of random numbers again. - Dan Sp.rand(4)into the script, it tells meline 0: invalid command. Doing print from the interactive Gnuplot in Terminal it gives me the same number 0.99...If I run the script from the terminal, the plot is the same each run. - pablorand()returns when run with an argument != 0 means? - Karlhelp randomin the gnuplot terminal and it will tell you. - Dan Sp.