B.6 Special matrices
The following statements are used to construct some special matrices, like the identity or a matrix of zeros.
Syntax | Arguments and performed function |
W = eye(M, N); | W is the MN upper left block of an identity matrix of size MM if MN or NN otherwise.
|
W = zeros(M, N); | W is an MN matrix of zeros.
|
W = ones(M, N); | W is an MN matrix of ones.
|
W = range(f, t , b); | W is a column vector containing values from f to t, spaced by b. The default value of b is one.
|