Skip to content
Property Value
Hex Value $20
Categories
Localizations
  • FR: MatAléat(

randM(

Overview

Returns a random matrix of rows × columns.
Max rows x columns = 400 matrix elements.

Availability: Token available everywhere.

Syntax

randM(rows,columns)

Arguments

NameTypeOptional
rowsinteger
columnsinteger

Location

2nd, matrix, MATH, 6:randM(


Description

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.

Source: parts of this page were written by the following TI|BD contributors: burr, DarkerLine, GoVegan, MrTanookiMario.

History

Calculator OS Version Description
TI-82 1.0 Added
Authors: Adrien Bertrand