Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. x = [-0.10093605653422201, -0.06729070435614802, 0.0, 0.06729070435614802, 0.10093605653422201]
  2. y = [0.7701744 0.52964054 0.44325221 0.61695343 0.72468718]
  3.  
  4. from scipy.interpolate import CubicSpline
  5. cs = CubicSpline(x, y, bc_type='natural')
  6. x_plot = np.linspace(-0.16, 0.16, 100)
  7. plt.plot(x_plot, [cs(xi) for xi in x_plot])
  8. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement