Texas Instruments TI-89 Tip List page 97

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

Advertisement

EndFunc
As an example, use m3aind() to find the element address of the 7th element of a 3x3x3 array:
m3aind(7,{3,3,3})
This example for m4aind() finds the 27th element of a 4x4x4x4 array:
m4aind(27,{4,4,4,4})
This example for mnaind() finds the address for the 40th element of a 5x4x3x2x1 array:
mnaind(40,{5,4,3,2,1})
Note that mnaind() returns an empty list if an error condition occurs; your calling program can test for
this condition to verify proper operation.
mnaind() is especially useful for finding the general expression for the addresses of elements for arrays
of any rank. For example, use this call to mnaind() for a rank-5 array:
mnaind(k,{d[1],d[2],d[3],d[4],d[5]})
This will only work properly if k and the list d are not defined variables. The expression returned is quite
lengthy (and not shown here), but it is correct.
The 89/92+ do not have built-in functions for higher-dimension arrays, but the simple list storage
method means that simple array operations are trivial. These examples show operations on two arrays
m1 and m2, with the result in array m3. k is a constant or expression. The comment in parentheses
shows the equivalent built-in 89/92+ array function. In general, m1 and m2 must have the same
dimensions.
Add two arrays (equivalent to .+)
Add an expression to each element (equivalent to .+)
Subtract arrays (equivalent to .-)
Subtract an expression from each element (equivalent to .-)
Multiply array elements (equivalent to .*)
Divide array elements (equivalent to ./)
Multiply array elements by an expression (equivalent to .*)
Divide expression by array elements (equivalent to ./)
Negate array elements
Raise each array element to a power
Raise each m1 element to m2 power (.^)
Raise an expression to each element m1 power (.^)
Take the reciprocal of each element
returns
{1,3,1}
returns
{1,2,3,3}
returns
{2,3,2,2,1}
m1+m2→m3
k+m1→m3
m1-m2→m3
m1-k→m3
m1*m2→m3
m1/m2→m3
k*m1→m3
m1/k→m3
-m1→m3
m1^k→m3
m1^m2 →m3
k^m1→m3
1/m1→m3
3 - 15

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents