repmat(a, n, m = n)
a
replicated to the number of times
in each dimension specified.
Defaults to square if dimension argument resolves to a single value.repmat(a,m,n)
creates a large matrix consisting of an m-by-n tiling
of copies of a
.reshape
,repmat(1, 3) # same as ones(3)
repmat(1, 3, 3)
repmat(matrix(1:4, 2, 2), 3)
Run the code above in your browser using DataLab