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

Popular posts from this blog

Multiple linear regression for GW depth estimaition

Class in Python

To check if a student has a honor's degree (Using Class in python)