repmat | R Documentation |
Replicate and tile matrix.
repmat(a, n, m = n)
a |
vector or matrix to be replicated. |
n , m |
number of times to replicate in each dimension. |
repmat(a,m,n)
creates a large matrix consisting of an m-by-n tiling
of copies of a
.
Returns matrix with value a
replicated to the number of times
in each dimension specified.
Defaults to square if dimension argument resolves to a single value.
Reshape
repmat(1, 3) # same as ones(3)
repmat(1, 3, 3)
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.