Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scipy.stats import norm
- import numpy as np
- import matplotlib.pyplot as plt
- import random
- mean_temp = 22 #peak temperature +- 2 oC
- mean_hum = 40 #peak humidity level(%) +- 10%
- x = np.linspace(norm.ppf(0.01), norm.ppf(0.99),num=1000)
- Temp = x + mean_temp
- Hum = x*5 + mean_hum
- def temp(N,s):
- for i in range(s):
- yield random.choice(N)
- temp(Temp,4)
- for i in temp(Temp,4):
- print(i)
- def humid(N,s):
- for i in range(s):
- yield random.choice(N)
- humid(Hum,4)
- for i in humid(Hum,4):
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement