Navigation

Operators and Keywords

Function List:

C++ API

: zeros (n)
: zeros (m, n)
: zeros (m, n, k, …)
: zeros ([m n …])
: zeros (…, class)

Return a matrix or N-dimensional array whose elements are all 0.

If invoked with a single scalar integer argument, return a square NxN matrix.

If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions.

The optional argument class specifies the class of the return array and defaults to double. For example:

val = zeros (m,n, "uint8")

See also: ones.

Package: octave