Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

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

Example:
matrix(2,5)

Result:
Contents of matrix

[1,]     1     1     1     1     1
[2,]     1     1     1     1     1
Example:
matrix(3,2,2)

Result:
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



(C) MD*TECH Method and Data Technologies, 05.02.2006