<< pi constructors functions

zeros


Creates an matrix made of zeros.


Syntax


R = zeros
R = zeros(n)
R = zeros(n, m)
R = zeros(n, m, ..., z)
R = zeros(n, m, ..., z, 'like', V)
R = zeros(n, m, ..., z, classname)

Input argument


n

a variable

m

a variable

Description


zeros returns a matrix made of zeros.

Examples


zeros(3, 2)

zeros(3, 1, 3, 'single')

A = single([3 3])
B = zeros(2, 4, 'like', A)

tic(); single(1) * zeros(1000); toc()
tic();zeros(1000, 'single'); toc()

See also


eye, ones.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< pi constructors functions