I am using random.seed
to generate pseudo-random numbers over a certain number of iterations. However, with this method, for the same number of iterations, it generates the same initial value each time. I am wondering if there is a way to write the code to generate 4 different random initial values that are in different locations in the parameter range? For example my code looks like this:
import random
N=10
random.seed(N)
vx1 = [random.uniform(-3,3) for i in range(N)]
And each time this will generate the starting vx1[0] = 0.428
. Is there a way to write the code for it to generate four different initial values of vx1
? So the initial value for vx1
could equal 0.428 or 3 other values. Then each initial value would also have the following 9 random numbers in the range.