Interpolation and graph
import numpy as np
from scipy import interpolate
import matplotlib.pyplot as plt
Kc=np.array([0.35,0.35,0.75,1.15,0.45])
Days=np.array([1,15,40,90,120])
f=interpolate.interp1d(Days, Kc)
print(f(20))
plt.xlabel('Days')
plt.ylabel('Kc')
plt.title("Kc vs Days")
plt.plot(Days, Kc, )
plt.show()
Comments
Post a Comment