项目作者: gmguarino

项目描述 :
A Quick cubic Spline interpolation implementation in C.
高级语言: C
项目地址: git://github.com/gmguarino/QSpline.git
创建时间: 2020-02-19T17:40:58Z
项目社区:https://github.com/gmguarino/QSpline

开源协议:MIT License

下载


QSpline

QSpline is a simple implementation of cubic spline interpolation in C.

Setting Up

Download the repository:

  1. git clone https://github.com/gmguarino/QSpline.git

Install gnuplot:

Linux

  1. sudo apt update
  2. sudo apt install gnuplot

Mac OS X

  1. brew install gnuplot --with-x11

Windows

Download from their repo

  1. https://sourceforge.net/projects/gnuplot/files/gnuplot/

Running the Demo

To run the demo simply execute the shell script execute.sh (Linux).

The results are plotted and saved to out.jpeg:

alt text

Running step-by-step

Compile the example program interp.c:

  1. gcc -o interp interp.c QSpline.c -lm

Run the executable:

  1. ./interp

Plot the results using the .plot script in gnuplot:

  1. gnuplot plotter.plot > out.jpeg

The results will be still stored in out.jpeg.

Remember!

Always clean up after yourself:

  1. rm interp undersampled.dat interpolated.dat