A matrix is a two dimensional array of double precision real numbers, with rows and columns. The row and column indices of a matrix are separated with a comma. The row dimension is specified first. There is no maximum size for matrices.
A literal matrix can be a list of vectors, such as,
[[1;2;3];[4;5;6];[7;8;9]]
, or an expression that results
in a matrix, such as [2:5]><[2:6]
.
The following table shows the possible ways that variables can be considered to be equivalent to matrices, that is, can be used wherever matrices are expected.
Let x
and y
be vectors.
Suppose that M
is a matrix.
M | = | M[i,j] for i=1,...,VLEN(M)[1],
j=1,...,VLEN(M)[2] |
M[x,y] | = | M[i,j] for i=x[1],x[2],...,x[#], j=y[1],y[2],...,y[#] |