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

Example:
zeros(2,5)

Result:
Contents of matrix

[1,]     0     0     0     0     0
[2,]     0     0     0     0     0
Example:
zeros(3,2,2)

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



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