Interpolation by cubic splines

Please choose:
My own (x,y)-data

Please specify the number of your data: 4<=n<=200



Please write here your data, each point on a new line, the two values separated by comma or blank, no parentheses

(x,y)=

print formula
do not print formula

Specify the type of boundary condition: natural (=1) or hermitian (=2)


In the hermitian case: specify the boundary slopes here

S'(x(1))=
S'(x(n))=
Synthetic data

Please choose the type:

natural spline
hermitian spline How to compute the slopes:
f'(a) and f'(b) are computed analytically
f'(a) and f'(b) each are computed by interpolating 4 boundary points.

Choose a function:

f(x) = x2/3
f(x) = 1/(1+25x2)
f(x) = sin(2*pi*x)
f(x) = tanh(x)
f(x) = exp(x)

Specification of a function of your own:

Please type the evaluation program of your function here using FORTRAN rules. Your final statement must be

      fu= some expression you computed before or just here depending on x
You may use the constants pi, e(=exp(1)), sqrt2(=1.414...), the integer variables i,j,k, the logicals bool1,bool2,bool3 and the double precision variables sum,h1,h2,h3,h4,y(100),z(100),a(100,100) which are all intialized with zero resp. .false. . The routine has the parameters x (double, input) and fu (double out). never change x!. first is a local integer and set 0 before calling the function the first time. You may use this in order to initialize some local data and set it 1 afterwards to avoid multiple such initialization. Your settings of the local variables are preserved during program execution.

if you want to compute f'(a), f'(b)analytically your piece of code must follow the restrictions of JAKEF

Specify the number of interpolation points here:
n = Wichtig : 4 <= n <= 200 !

Specify the interval for the x-data:
a = b =

Click on "evaluate", in order to submit your input.

Back to the theory page

 Back to the top!

18.02.2015