Replicate matric x
repmat(x, nrows, ncols = nrows)
x
original matrix
nrows
number of times replicate matrix row wise
ncols
number of times replicate matrix columns wise