问题描述
我想用python绘制一系列方程。这个方程式
在此,GWL(ti)是每日地下水,GWL0 = 12,phi = 0.6,a = 0.01。 p(tn)是每日降雨量,可从Excel文件读取。这是我的代码:
import pandas as pd
from matplotlib import pyplot as plt
import numpy as np
data =pd.read_excel('rainfall.xlsx')
phi = 0.6
b= 0.01
x = data['Date']
a = data['Amount']
for i in range (1,1538):
for j in range(1,i):
gwl =+ (a/phi)*np.exp(-b*(i-j))
gwl2 = 10-gwl
plt.plot(x,gwl2)
plt.show()
此代码的输出错误。正确的图是图中的蓝色,红色是此代码的输出。这是excel文件的头。 Excel文件中的行数为1539。
Date Amount
1 0.0008
2 0.011
3 0.0005
4 0.0002
5 0.0004
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)