- #!/usr/local/bin/python3
- import numpy as np
- from scipy.integrate import simps
- def f(x):
- return (x + x/2)**2
- x = np.array([1, 2])
- y = f(x)
- i = simps(y, x)
- print(i)
Author: Not specified | Language: text |
Description: Not specified | Timestamp: 2017-06-26 04:44:58 +0000 |
View raw paste | Reply |
View raw paste | Reply |