Sie sind auf Seite 1von 5

Interpolation Work Sheet

Enter the known data pairs here: Linear


Linear Interpolation
Interpolation
x y
Data 1 1 4 This
This routine
routine calculates
calculates aa line
line that
that passes
passes through
through two
two data
data pairs
pairs x1,y1
x1,y1 and
and x
values
values that
that define
define the
the line:
line: M,
M, the
the slope
slope of
of the
the line,
line, and
and B,
B, the
the offset
offset of
of the
the lili
Data 2 3 5 been
been calculated,
calculated, any
any other
other xx or
or yy data
data points
points can then be found on the line.

Calculated M and B: Here


Here are
are how
how M
M and
and B
B are
are calculated:
calculated:
M 0.5 OK
M
M == (y2-y1)/(x2-x1),
(y2-y1)/(x2-x1), and
and B == y2
y2 -- (x2
(x2 * M) or y1 - (x1 * M)
B 3.5
Then
Then new
new yy points
points can
can be
be found
found with
with yy == Mx
Mx ++ b,
b,
Test x Result y Test y Result x and
and new
new xx points
points can
can be
be found
found with
with x == (y-B)/M.
(y-B)/M.
1 4 1 -5 Instructions:
Instructions:
2 4.5 2 -3
3 5 3 -1 1.
1. Enter
Enter the
the known
known data
data pairs
pairs x1,y1
x1,y1 and
and x2,
x2, y2
y2 at
at the
the top
top left.
left.
2.
2. Enter
Enter test
test xx values to see result y values, or enter test y values to see res
4 5.5 4 1
5 6 5 3
6 6.5 6 5
7 7 7 7
8 7.5 8 9
9 8 9 11
10 8.5 10 13
11 9 11 15
12 9.5 12 17
13 10 13 19
14 10.5 14 21
15 11 15 23
16 11.5 16 25
17 12 17 27
18 12.5 18 29
19 13 19 31
20 13.5 20 33
21 14 21 35
22 14.5 22 37
23 15 23 39
24 15.5 24 41
25 16 25 43
26 16.5 26 45
27 17 27 47
28 17.5 28 49
29 18 29 51
30 18.5 30 53

Page 1
Interpolation Work Sheet

ugh
ugh two
two data
data pairs
pairs x1,y1
x1,y1 and
and x2,y2.
x2,y2. ItIt computes
computes two
two
line,
line, and
and B,
B, the
the offset
offset of
of the
the line.
line. Once
Once M M and
and B
B have
have
an then be found on the line.
can

1 - (x1 * M)

+ b,
b,
M.

22 at
at the
the top
top left.
left.
r enter test y values to see result x values.

Page 2
Chart

Chart Settings
x Result y
y = 0.5x + 3.5
xmin -10 -1.5
xmax 10 8.5
10

Chart Title y =2 0.5x + 3.5

Axis Title 0
-10 -8 -6 -4 -2 0 2 4 6 8

-2

-4

-6

-8

-10
Axis Title

Page 3
Chart

4 6 8 10

Page 4
Copyright

© Copyright 1996, P. Lutus -- lutusp@arachnoid.com. These works


are in the CareWare program. Please read the description at
http://www.arachnoid.com/careware.

Page 5

Das könnte Ihnen auch gefallen