Texas Instruments TI-89 Tip List page 216

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

Advertisement

Prgm
©2nd-order interpolation
©15oct00 dburkett@infinet.com
©calls str2var()
local a1,b1,a2,b2,a3,b3,x1y1,x2y2,x3y3,x
© Initialize all the point variables
© (note that a1==x1, b1==y1, etc)
1→a1
2→b1
3→a2
4→b2
5→a3
6→b3
0→x
© Transfer control here to repeat interpolations
lbl t1
© Convert x- and y-data to pairs as strings; also convert 'x' to string
string(a1)&","&string(b1)→x1y1
string(a2)&","&string(b2)→x2y2
string(a3)&","&string(b3)→x3y3
string(x)→x
© Dialog box for user to enter xy data points
dialog
title "ENTER DATA POINTS"
request "x1,y1",x1y1
request "x2,y2",x2y2
request "x3,y3",x3y3
request "x",x
text "(Push ESC to quit)"
enddlog
if ok=0:goto exit1
© Convert the interpolation 'x' to a number
expr(x)→x
© Convert the x1, y1 data point string to numbers
str2var(x1y1)→res
if gettype(res)="STRING":goto err1
res[1]→a1
res[2]→b1
© Convert the x2, y2 data point string to numbers
str2var(x2y2)→res
if gettype(res)="STRING":goto err1
res[1]→a2
res[2]→b2
© Convert the x3, y3 data point string to numbers
str2var(x3y3)→res
if gettype(res)="STRING":goto err1
res[1]→a3
res[2]→b3
© Build lists for QuadReg call
{a1,a2,a3}→l1
{b1,b2,b3}→l2
© Give user a chance to quit here
6 - 58

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents