Texas Instruments TI-89 Tip List page 387

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

Advertisement

Equation library with multiple menus
If your often use many equations, it is awkward to choose the correct equation from the single pop-up
menu used in eqlib(). One solution is to use multiple equation library matrices to organize groups of
equations. eqlibx(), shown below, implements this idea.
eqlibx()
Prgm
©Eqn library, multiple menus
©14nov01/dburkett@infinet.com
©main\eqlxmenu{} holds menu names
©main\eqdef{m}[n,2] holds labels & equations; {m} = 1,2,3,...
local k,n
0→k
popup main\eqlxmenu,k
if k=0:return
"main\eqdef"&string(exact(k))→n
0→k
popup mat▶list(subMat(#n,1,1,rowDim(#n),1)),k
if k=0:return
#n[k,2]→eqn
setMode("Split 1 App","Numeric Solver")
EndPrgm
This program displays two pop-up menus. The first menu shows the names of the different libraries.
The second menu shows the equations in the chosen library. The library names are stored in the list
variable main\eqlxmenu. For example, you might have three groups of equations for geometry,
electricity, and physics, and you could use this for main\eqlxmenu:
{"geometry","electricity","physics"}
There is a corresponding equation matrix for each element of eqlxmenu, and the matrices have
specific names. The library for the first element is main\eqdef1, for the second element is main\eqdef2,
and so on. For our example, the equation matrices are
geometry:
main\eqdef1
electricity:
main\eqdef2
physics:
main\eqdef3
The format of these equation matrices is the same as that of eqlib() above: the first column c1 is the
equation label, and the second column c2 is the equation. These examples show typical equation
matrices.
Matrix main\eqdef1 for geometry equations
c1
1
"cosines law"
2
"triangle area"
3
"polygon area"
© Display 'menu of menus'
© Quit if [ESC] pressed
© Build name of library matrix
© Display equation menu
© Quit if [ESC] pressed
© Set chosen equation
© Start numeric solver
c2
c^2=a^2-2*a*b*cos(cc)+b^2
.5*a*b*sin(cc)=area
tan(Œ/k)*k*r^2=area
9 - 28

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents