热门标签
更多>
搜索结果
查询Tags标签: 特斯,共有 2条记录-
用python实现牛顿-柯特斯公式
import numpy as np import math from scipy import integratedef f(x):return math.exp(-x**2)def g(x):return math.exp(-x**2)def func(a,b,n,g):x = np.linspace(a,b,n+1)sum = 0h =(b-a)/nfor i in range(n):if i%2 == 0:sum = sum + 2*g(x[i])if i%2 != 0:sum = sum…
2021/10/30 14:09:47 人评论 次浏览 -
用python实现牛顿-柯特斯公式
import numpy as np import math from scipy import integratedef f(x):return math.exp(-x**2)def g(x):return math.exp(-x**2)def func(a,b,n,g):x = np.linspace(a,b,n+1)sum = 0h =(b-a)/nfor i in range(n):if i%2 == 0:sum = sum + 2*g(x[i])if i%2 != 0:sum = sum…
2021/10/30 14:09:47 人评论 次浏览