Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = [-0.10093605653422201, -0.06729070435614802, 0.0, 0.06729070435614802, 0.10093605653422201]
- y = [0.7701744 0.52964054 0.44325221 0.61695343 0.72468718]
- from scipy.interpolate import CubicSpline
- cs = CubicSpline(x, y, bc_type='natural')
- x_plot = np.linspace(-0.16, 0.16, 100)
- plt.plot(x_plot, [cs(xi) for xi in x_plot])
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement