项目作者: jsondoo

项目描述 :
Interpolates a cubic spline from an arbitrary set of data points 📉
高级语言: Jupyter Notebook
项目地址: git://github.com/jsondoo/CubicSplineInterpolator.git
创建时间: 2017-02-19T22:48:46Z
项目社区:https://github.com/jsondoo/CubicSplineInterpolator

开源协议:MIT License

下载


Cubic Spline Interpolator

A jupyter notebook that interpolates a cubic spline from any set of data points given by the user.

Usage

First, download the jupyter notebook file.

  1. git clone https://github.com/jsondoo/Cubic-Spline-Interpolator.git

To try the interpolator, go here and upload the .ipynb file.
Or if you have jupyter notebook installed:

  1. jupyter notebook

Open the file and enter your data points in the first cell into the x and y array. Then click Cell -> Run All. Scroll down to see the beautiful plot :)

Examples

a) Data points: (0,5), (1,9), (2,2), (3,4)

Input:

  1. x=[0,1,2,3]
  2. y=[5,9,2,4]

Output:

b) Data points: (-2,10), (3,48), (5,20), (7.5,33), (10,144), (11,9), (12,27)

Input:

  1. x = [-2, 3, 5, 7.5, 10, 11, 12]
  2. y = [10, 48, 20, 33, 144, 9, 27]

Output:

Written in Python 3. Last updated February 19th, 2017.