Suppose I intend to generate random numbers within fixed ranges and I wish to changes these ranges randomly once in a while, how would I nest a random function inside another?
For example, in the data set below, when T=0.5,1.5,etc.. I want the value to be between 1 and 2 and when T=1,2,3, etc.. I want the value to be between 2 and 3. However, at a complete whole number, once in every 10 units of T, I want the whole number value of T to correspond to a value between 5 and 6 and once in every hundred whole number values of T to generate a random number between 15 and 16.
I want the selection to be random. For example, T=3,17,28,36,45,57,63, etc.. to generate a value between 5 and 6 and say T=66 or any random number between 1 and 100 to generate a value between 15 and 16.
T Value
0.5 1.01
0.5 1.05
0.5 1.85
0.5 1.49
1 2.45
1 2.52
1 2.48
1 2.95
1.5 1.78
1.5 1.45
1.5 1.65
1.5 1.77
2 2.96
2 2.75
2 2.74
2 2.95
2.5 1.75
2.5 7.89
2.5 1.33
2.5 1.58
3 5.78
3 5.44
3 5.36
3 5.24
Aucun commentaire:
Enregistrer un commentaire