Texas Instruments TI-89 Tip List page 204

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

(y-ya)/(yb-ya)→u
(1-t)*(1-u)*zaa+t*(1-u)*zba+t*u*zbb+(1-t)*u*zab
EndFunc
Note that the variable names have been changed to avoid conflict with built-in variables. The
equivalence is
xa == x
ya == y
1
xb == x
yb == y
2
The z-variables are named so it is easy to remember which z-variable goes with a particular (x,y) data
point. The second two characters of each z-variable indicate the corresponding x- and y-variables:
zaa = f(xa,ya)
As an example, given this data:
to interpolate for x = 0.52 and y = 0.28, the call is
bilinint(.5,.6,.2,.3,.4699,.4580,.5534,.5394,.58,.28)
which returns 0.4767.
This program, bilinui(), provides a user interface for the interpolation function.
bilinui()
Prgm
©User interface for bilinint()
©8oct00 dburkett@infinet.com
local z
if gettype(x1)="NONE" then
0→xa:2→xb:0→ya:2→yb
0→zaa:1→zab:2→zba:3→zbb
1→x:1→y
endif
lbl l1
string(xa)→xa:string(xb)→xb
string(ya)→ya:string(yb)→yb
string(zaa)→zaa:string(zab)→zab
string(zba)→zba:string(zbb)→zbb
dialog
title "bilinui"
request "x1",xa
request "x2",xb
1
2
zab = f(xa,yb)
xa = 0.5
zaa = 0.4699
xb = 0.6
zba = 0.5534
zaa == z
1
zba == z
3
zba = f(xb,ya)
ya = 0.2
zab == z
2
zbb == z
4
zbb = f(xb,yb)
yb = 0.3
zab = 0.4580
zbb = 0.5394
6 - 46

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents