The randMat() Command


Command Summary

Generates a random matrix.

Command Syntax


Menu Location

  • Press 2nd MATH to enter the MATH popup menu.
  • Press 7 to enter the Probability submenu.
  • Press 7 to select randMat(.

Calculator Compatibility

This command works on all calculators.

Token Size

1 byte

The randMat() command generates a random matrix: randMat(rows,columns) generates a rows by columns matrix whose entries are random integers between -9 and 9.

:RandSeed 0
           [4  -2]
           [0  -7]
           [8  8 ]

Advanced Uses

Using the RandSeed command makes the random matrix entirely predictable: after setting the random seed to some value, the same random matrix will be returned every time (assuming the size is the same). See the RandSeed page for details of how random numbers are generated.

Error Conditions

260 - Domain error happens when the rows and columns parameters aren't positive integers..

Related Commands

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.