All
and
more
about Sharp PC-1500 at http://www.
PC-
1500.info
SHARP
PROGRAM
TITLE
[Outline
]
LAGRANGE'S INTERPOLATION
PROGRAM
NO.
P5
-
A-4
CE-
150
required
This program performs interpolation by using Lagrange's interpolation
polynomial to calculate the Yvalue for
the
X value
to
be interpolated.
[Operating
Gui
de
]
Input 1. Number
of
coordinates (N) (N < 61)
2. Coordinates input
Key-in coordinates
X
(i)
and Y (i). ( 1
.$.
i
~
N)
3. After
"Z
=
"has
been displayed, key-in the x-coordinte to interpolate.
Output 4. Interpolated value
"
X=":
keyed-in x-coordinate to
int
erpolate (=Z)
"P
=":
Interpolated value (y-axis)
The
abo
ve
3
and
4
ca
n be executed repeatedl
y.
[ Example ]
Number
of
coordinates: 4
Coo
rdinat
es
: (5,3)
(8,9)
(I
2,
4)
(6,1)
Values to be interpolate
d:
7
[
Contents]
(Formulas)
I
To ma
ke
int
er
polation, using Lagrange's interpolation polynom
ia
l, determine
the
value required for
int
erpolation.
Assuming the nu
mber
of
coordinates is n, determine a polynomial with degree n - I
P.
- 1
(x)
=
a.
- 1
x•
-
1
+
a.
, x • -•+···+
a1x
1
+
a.
Since
P.
- 1 (
x)
= 1
/1
b,
(x)
+
y,b
,
(X)
+···+
y.
b.
(x)
For k =
l.2···
n,
•
=
II
(x
-
x;
)
(x;
-
x;)
This
yie
ld
s
the
required interpolation value.
Do
not
sale this
PDF!!!
-
15
-