
MAKEMAT(expression, rows, columns)
MAKEMAT(expression, elements)
Examples:
MAKEMAT(0,3,3) returns a 3 × 3 zero matrix, [[0,0,0],[0,0,0],[0,0,0]].
MAKEMAT(√2,2,3) returns the 2 × 3 matrix [[√2,√2,√2],[√2,√2,√2]].
MAKEMAT(I+J–1,2,3) returns the 2 × 3 matrix [[1,2,3],[2,3,4]]
Note in the example above that each element is the sum of the row number and column number minus 1.
Identity
Identity matrix. Creates a square matrix of dimension size × size whose diagonal elements are 1 and
odiagonal elements are zero.
IDENMAT(size)
Random
Given two integers, n and m, and a matrix name, creates an n x m matrix that contains random integers in the
range −99 through 99 with a uniform distribution and stores it in the matrix name. Given only one integer,
returns a vector of that length, lled with random integers. Given an optional additional pair of integers,
returns a matrix of the random numbers restricted to the interval dened by those integers.
randMat([MatrixName],n,[m], [lower, upper})
Example:
RANDMAT(M1,2,2) returns a 2x2 matrix with random integer elements, and stores it in M1.
Jordan
Returns a square nxn matrix with expr on the diagonal, 1 above and 0 everywhere else.
JordanBlock(Expr,n)
Example:
JordanBlock(7,3) returns
Hilbert
Given a positive integer, n, returns the nth order Hilbert matrix. Each element of the matrix is given by the
formula 1/(j+k-1) where j is the row number and k is the column number.
hilbert(n)
Example:
534 Chapter 26 Matrices
Komentarze do niniejszej Instrukcji