Create array of all zeros

`X = zeros`

returns the scalar `0`

.

`X = zeros(`

returns
an `sz1,...,szN`

)`sz1`

-by-...-by-`szN`

array of
zeros where `sz1,...,szN`

indicate the size of each
dimension. For example, `zeros(2,3)`

returns a 2-by-3
matrix.

`X = zeros(___,`

returns
an array of zeros of data type `typename`

)`typename`

. For example, `zeros('int8')`

returns
a scalar, 8-bit integer `0`

. You can use any of the
input arguments in the previous syntaxes.

Was this topic helpful?