|
We're glad you came by, but you might find what you're looking for elsewhere. TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it. Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope. |
Creates a matrix of specified size with the entries random integers from -9 to 9.
randM(# rows, # columns)
Press:
- MATRX (TI-83) or 2nd MATRX (TI-83+ or higher) to access the matrix menu
- RIGHT to access the MATH submenu.
- 6 to select randM(, or use arrows.
TI-83/84/+/SE
1 byte
randM(M, N) generates an M by N matrix whose entries are pseudorandom integers between -9 and 9 inclusive.
seed→rand affects the output of randM(.
0→rand
0
randM(3,3)
[[9 -3 -9]
[4 -2 0 ]
[-7 8 8 ]]If you actually cared about the bounds of the random numbers, this command would not be very useful, since it's hard to manipulate the matrix to yield uniformly spread random numbers in a different range.
Formulas
The entries of randM( are actually the outputs of successive calls to randInt(-9,9), filled in starting at the bottom right and moving left across each row from the last row to the first.
Error Conditions
- ERR:INVALID DIM is thrown if the number of rows or columns of the matrix isn't an integer 1-99.
Related Commands
.