powered by
Repeat a vector or matrix a specific number of times.
repmat(x, m, n)
A block matrix of dimension m*nrow(x) by n*ncol(x).
m*nrow(x)
n*ncol(x)
A vector or matrix.
Integer specifying how many times to repeat x in the first dimension.
x
Integer specifying how many times to repeat x in the second dimension.
repmat(1:3, 3, 2) # will have dimension 9 by 2 repmat(randn(2, 2), 3, 2)
Run the code above in your browser using DataLab