eye | R Documentation |
Create basic matrices.
eye(n, m = n)
ones(n, m = n)
zeros(n, m = n)
m, n |
numeric scalars specifying size of the matrix |
Matrix of size n x m
.
Defaults to a square matrix if m
is missing.
No dropping of dimensions; if n = 1
, still returns a matrix and
not a vector.
Diag
,
eye(3)
ones(3, 1)
zeros(1, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.