Functions for Creating Arrays |
matrix(m, n, f) Returns an m × n matrix in which the ijth element contains f(i,j).
diag(v/M) Returns a matrix containing on its diagonal the elements of v, or returns a vector containing the diagonal of the matrix M.
identity(n) Returns an n × n identity matrix (a matrix of 0's with 1's along the diagonal).