Skip to content

Quadratic Spline

Sambit Paul edited this page Dec 2, 2023 · 5 revisions

quadratic

The cubic spline is a B-spline of order 2. JDSP provides the QuadraticSpline class as a child class of BSpline. 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
QuadraticSpline qbs = new QuadraticSpline();
qbs.computeFunction(this.x, this.y);
double[] xnew = UtilMethods.linspace(0.0, 10.0, 201, true);
double[] result = qbs.getValue(xnew);
Clone this wiki locally