repmat | R Documentation |
Repeat a vector or matrix a specific number of times.
repmat(x, m, n)
x |
A vector or matrix. |
m |
Integer specifying how many times to repeat |
n |
Integer specifying how many times to repeat |
A block matrix of dimension m*nrow(x)
by n*ncol(x)
.
repmat(1:3, 3, 2) # will have dimension 9 by 2
repmat(randn(2, 2), 3, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.