repmat | R Documentation |
Replicate and tile a matrix.
repmat(A, ...)
A |
vector or matrix to be tiled. Must be numeric, logical, complex or character. |
... |
numeric dimensions for the result |
Returns matrix with value A
tiled to the number of dimensions specified.
Defaults to square if dimension argument resolves to a single value.
P. Roebuck proebuck1701@gmail.com
ones
,
zeros
repmat(1, 3) # same as ones(3)
repmat(1, c(3, 3)) # same thing
repmat(1, 3, 3) # same thing
repmat(1, size(matrix(NA, 3, 3))) # same thing
repmat(matrix(1:4, 2, 2), 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.