Akima Spline - psambit9791/jdsp GitHub Wiki

akima

Constructs an Akima Spline using continuously differentiable sub-spline built from piecewise cubic polynomials. The output for a spline with 201 points for a signal with 41 points is shown in the image.

computeFunction() accepts two arguments - a monotonoically increasing interval (x) and their values (y).

getValue() accepts one argument - a monotonically increasing interval with the same extremes as x but with different samples.

Code
AkimaSpline aks = new AkimaSpline();
aks.computeFunction(this.x, this.y);
double[] xnew = UtilMethods.linspace(0.0, 10.0, 201, true);
double[] result = aks.getValue(xnew);