the equation which is currently in the system variable eqn, and you can save any equation to that
variable.
You provide the equation libraries. The library consists of a label (or name) for each equation, and the
equation itself. It is easier to choose the equation by name, for example, pendulum period, than by
choosing the equation. The library is a matrix with the equation names in the first column, and the
equations in the second column.
If you have only a few equations, you can quickly choose a particular equation from one list of equation
names.. But if you have dozens or hundreds of equations, it is more convenient to first choose a group
of equations, then the desired equation from that group. To meet both requirements I show two
equation library programs. eqlib() uses a single list of equations. eqlibx() uses groups of equations.
Equation library with one menu
The program for the single-menu equation library is:
eqlib()
Prgm
©Eqn library, one menu
©14nov01/dburkett@infinet.com
©main\eqdef[n,2] holds labels & equations
local k
© Initialize pop-up menu index to zero, to allow use of [ESC] key to quit
0→k
© Extract and display equation labels as a pop-up menu
popup mat▶list(subMat(main\eqdef,1,1,rowDim(main\eqdef),1)),k
© Quit if [ESC] pressed: no equation chosen
if k=0:return
© Set the equation and start the numeric solver
main\eqdef[k,2]→eqn
setMode("Split 1 App","Numeric Solver")
EndPrgm
This is a very simple equation library, but it can be implemented in only five functional lines of TI Basic.
Before you can use eqlib(), you must set up the equation library in matrix main\eqdef. You can create
this matrix in the entry line, or you can use the built-in matrix editor by pressing [APPS] [6] [3] to create
a new matrix. Refer to the complete TI-89/92+ user's guide to learn how to use the matrix editor. As an
example, eqdef might look like this:
f*tan(θ)/(a*g)=d
"shear"5
h=2*cos(α)*τ/(g*ρ*r)
"capillary"4
t=2*Œ*√(l/(d*g*m))
"pendulum"3
x=a*cos(ω*t+φ)
"periodic motion"2
.5*m*v^2=e
"kinetic energy"1
c2c1
The first column c1 holds the equation labels. These are the names that are shown in the pop-up menu
to choose the equation, so use names such that you can remember the equation to which they apply.
The names are strings with double-quote characters. The second column c2 holds the equations
themselves.
9 - 26