Advertisement
mavridaki

Untitled

Dec 7th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. from scipy.stats import norm
  2. import numpy as np
  3. import matplotlib.pyplot as plt
  4. import random
  5.  
  6. mean_temp = 22 #peak temperature +- 2 oC
  7. mean_hum = 40 #peak humidity level(%) +- 10%
  8.  
  9. x = np.linspace(norm.ppf(0.01), norm.ppf(0.99),num=1000)
  10. Temp = x + mean_temp
  11. Hum = x*5 + mean_hum
  12.  
  13. def temp(N,s):
  14. for i in range(s):
  15. yield random.choice(N)
  16. temp(Temp,4)
  17. for i in temp(Temp,4):
  18. print(i)
  19.  
  20.  
  21. def humid(N,s):
  22. for i in range(s):
  23. yield random.choice(N)
  24. humid(Hum,4)
  25. for i in humid(Hum,4):
  26. print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement