Professional Documents
Culture Documents
Numerical - Splines
Numerical - Splines
16-4
2‐ Quadratic ( 2nd Order )
3- Natural Cubic Spline
Or
Example:
Given the data
n x y
1 3 2.5
2 4.5 1.0
3 7 2.5
4 9 0.5
5 11 2
Solution:
Interval x y Remark
1 3 2.5 y2
4.5 1 y3
2 7 2.5 y4
Matrix formulation
.
@x=5 Î i=2
.
.
.
.
.
. .
Therefore .
Interval x y Remark
1 3 1 y2
4.5 2.5 y3
2 7 2.5 y4
3 0.5 Y5
9
Matrix formulation
. , . ,
.
Therefore
.
@x=5 Î i=2
.
.
.
. . .
. . .
. .
.
Therefore .
Interval x y Remark
1 3 1 y2
4.5 2.5 y3
2 7 2.5 y4
3 0.5 y5
9
4 11 2 Y6
Matrix formulation
.
Therefore .
.
@x=5 Î i=2
.
.
.
. . .
. . .
. .
.
Therefore .
Or
Were @ x = 5 Î i = 2
. .
.
.
.
.
. . . . .
= -0.9167
.
1
. . .
. . .
.
3
2.5
1.5
0.5
0
3 4 5 6 7 8 9 10 11
Data Points
Interpolant Function
Desired Value
Multidimensional Interpolation
“Bilinear Interpolation”
y
f(x1,y2) f(x2,y2)
y2
f(xi,yi)
yi
y1 f(x1,y1) f(x2,y1)
y2
yi
y1
X1 Xi X2
X
Example:
Temperatures at the surface of plate
T(2,1) = 60, T(2,6) = 55
T(9,1) = 57.5, T(9,6) = 70
Estimate the temperature at x = 5.25, and y = 4.8
Solution:
For Bilinear Interpolation
, , ,
, ,
16-32
xi = 5.25, x1 = 2, x2 = 9, yi = 4.8, y1 = 1, y2 = 6
, , , . , , , ,
Therefore,
. , . .