lunes, 16 de noviembre de 2020

Cubic spline interpolation Online


Cubic spline interpolation

Performs and visualizes a cubic spline interpolation for a given set of points. 


https://tools.timodenk.com/cubic-spline-interpolation




Example


-1.5 -1.2

-.2 0

1 0.5

5 1

10 1.2

15 2

20 1


Points

P0(1.5|1.2);P1(0.2|0);P2(1|0.5);P3(5|1);P4(10|1.2);P5(15|2);P6(20|1)

Equation

f(x)={7.5160102x33.3822101x2+5.4277101x+1.2148101,if x[1.5,0.2],6.9014102x32.5172101x2+5.6007101x+1.2263101,if x(0.2,1],2.5014103x35.2179102x2+3.6053101x+1.8915101,if x(1,5],3.4778103x36.6825102x2+4.3376101x+6.7099102,if x(5,10],6.7257103x3+2.3928101x22.6273x+1.0271101,if x(10,15],4.2251103x32.5351101x2+4.7645x2.6689101,if x(15,20].

By default, the algorithm calculates a "natural" spline. Details about the mathematical background of this tool and boundary conditions can be found here.

x-value

Graph

51015200.511.52−0.5−1−1.5
o+
P0
P1
P2
P3
P4
P5
P6

LaTeX


Additional information

Cubic spline interpolation is a mathematical method commonly used to construct new points within the boundaries of a set of known points. These new points are function values of an interpolation function (referred to as spline), which itself consists of multiple cubic piecewise polynomials. Read more

Source code





No hay comentarios:

Publicar un comentario