Community
 
Aggiungi lista preferiti Aggiungi lista nera Invia ad un amico
------------------
Crea
Profilo
Blog
Video
Sito
Foto
Amici
   
 
 

Note of Numeric Calculus

Foxes Team

 

Interpolation Aitken method

This method is used to interpolate not equispaced data

f(x) = { (xi , yi)   i = 0, 1, ... n }

This method is efficient as the Newton formula, but it is more easy to implement with computer program.

The interpolation value yp = f(xp) at a given point xp, can be computed by the following iterative algorithm:

A simple Visual Basic code routine implementing this algorithm is:

Sub Interpolaz_Aitken(ByVal yi(), ByVal xi(), xp, yp)

'perform the aitken interpolation among n (xi,yi) points

'retuns yp= interpolation at xp

n = UBound(yi)

For j = 1 To n - 1

    For i = j + 1 To n

        y(i) = (y(j) * (x(i) - xp) - y(i) * (x(j) - xp)) / (x(i) - x(j))

    Next i

Next j

yp = y(n)

End Sub

 

Example: A function is known by the following table . Find the interpolate values for 0 < x < 4 with step h = 0.2

n

x

y original nodes

1

0

1

2

1

1

3

2

2

4

4

5

 

HOME