EndFunc
As an example, use m3aind() to find the element address of the 7th element of a 3x3x3 array:
m3aind(7,{3,3,3})
returns
{1,3,1}
This example for m4aind() finds the 27th element of a 4x4x4x4 array:
m4aind(27,{4,4,4,4})
returns
{1,2,3,3}
This example for mnaind() finds the address for the 40th element of a 5x4x3x2x1 array:
mnaind(40,{5,4,3,2,
1
})
returns
{2,3,2,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 .+)
m
1
+m2
→
m3
Add an expression to each element (equivalent to .+)
k+m
1→
m3
Subtract arrays (equivalent to .-)
m
1
-m2
→
m3
Subtract an expression from each element (equivalent to .-)
m
1
-k
→
m3
Multiply array elements (equivalent to .*)
m
1
*m2
→
m3
Divide array elements (equivalent to ./)
m
1
/m2
→
m3
Multiply array elements by an expression (equivalent to .*)
k*m
1→
m3
Divide expression by array elements (equivalent to ./)
m
1
/k
→
m3
Negate array elements
-m
1→
m3
Raise each array element to a power
m
1
^k
→
m3
Raise each m1 element to m2 power (.^)
m
1
^m2
→
m3
Raise an expression to each element m1 power (.^)
k^m
1→
m3
Take the reciprocal of each element
1
/m
1→
m3
3 - 15
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...