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