Group: | Matrix Manipulation |
Topic: | General Commands |
See also: | diag paf unit # |
Function: | matrix | |
Description: | matrix generates arrays up to eight dimensions. |
Usage: | z = matrix (d1 {, ..., dn}) | |
Input: | ||
d1, ..., dn | scalar (number of elements in dimension 1 ... n) | |
Output: | ||
z | d1 x d2 x ... x dn matrix containing 1 |
matrix(2,5)
Contents of matrix [1,] 1 1 1 1 1 [2,] 1 1 1 1 1
matrix(3,2,2)
Contents of matrix [,,1,1,1,1,1,1] [1,] 1 1 [2,] 1 1 [3,] 1 1 [,,2,1,1,1,1,1] [1,] 1 1 [2,] 1 1 [3,] 1 1