搜索结果
查询Tags标签: yPlot,共有 4条记录-
python欧拉法
import numpy as npimport matplotlib.pyplot as plt# Problem1h = [0.001, 0.005, 0.01, 0.05, 0.1]num = 5 / h[0]y = 1t = 0dy_dt = -1tPlot = np.arange(0, 5, h[0])yPlot = []for i in range(int(num)):yPlot.append(y)t += h[0]y += dy_dt * h[0]dy_dt = -2*y+2-np.…
2021/10/7 11:11:04 人评论 次浏览 -
python欧拉法
import numpy as npimport matplotlib.pyplot as plt# Problem1h = [0.001, 0.005, 0.01, 0.05, 0.1]num = 5 / h[0]y = 1t = 0dy_dt = -1tPlot = np.arange(0, 5, h[0])yPlot = []for i in range(int(num)):yPlot.append(y)t += h[0]y += dy_dt * h[0]dy_dt = -2*y+2-np.…
2021/10/7 11:11:04 人评论 次浏览 -
用python实现欧拉法求原函数
import numpy as npimport matplotlib.pyplot as plt# Problem1h = [0.001, 0.005, 0.01, 0.05, 0.1]num = 5 / h[0]y = 1t = 0dy_dt = -1tPlot = np.arange(0, 5, h[0])yPlot = []for i in range(int(num)):yPlot.append(y)t += h[0]y += dy_dt * h[0]dy_dt = -2*y+2-np.…
2021/10/7 11:10:59 人评论 次浏览 -
用python实现欧拉法求原函数
import numpy as npimport matplotlib.pyplot as plt# Problem1h = [0.001, 0.005, 0.01, 0.05, 0.1]num = 5 / h[0]y = 1t = 0dy_dt = -1tPlot = np.arange(0, 5, h[0])yPlot = []for i in range(int(num)):yPlot.append(y)t += h[0]y += dy_dt * h[0]dy_dt = -2*y+2-np.…
2021/10/7 11:10:59 人评论 次浏览