Hi,
Given that we start the call to the function ran2 with a negative integer [the seed] it will produce a series of random numbers. The sequence can be regenerated exactly if the same seed is used.
Now my question is that is there a way that we can directly enter into some point in the sequence and then continue from that point onwards ? For example if the random numbers for a certain seed are 0.35, 0.32, 0.44,0.32,0.66,0.32, 0.45.
If we know that seed which gave rise to this sequence, is there a way to get the function to return 0.66 and then continue from that point onwards?
The way I want to use it is in a simulation. Whereby if my simulation ends at a certain point and I need to restart it I should continue with the same sequence of random numbers. Thanks.