mardi 21 février 2017

How to make random selection from a set of random numbers?

  • I have a series expressed as

y = a*np.exp(-t/T1) + a*np.exp(-t/T2) + a*np.exp(-t/T3) + a*np.exp(-t/T4) + a*np.exp(-t/T5)

  • I want to generate this series n number of times.

  • For each iteration, I want the T1-T5 values to be picked from another set of values.

  • These values are also ranges of random numbers-

value1 = np.random.uniform(1,5)
value2 = np.random.uniform(6,10)
value3 = np.random.uniform(11,15)
value4 = np.random.uniform(16,20)
value5 = np.random.uniform(21,25)
value6 = np.random.uniform(26,30)
value7 = np.random.uniform(31,35)
value8 = np.random.uniform(36,40)
value9 = np.random.uniform(41,45)
value10 = np.random.uniform(46,50)

What is the easiest way to do this task? can I use something like np.random.choice to pick from the set of values for each T?




Aucun commentaire:

Enregistrer un commentaire