repmat
Replicate and tile array
Syntax
B = repmat(A,M,N)
Description
B = repmat(A,M,N) creates a large matrix
B consisting of an M-by-N
tiling of copies of A.
B = repmat(A,[M N]) accomplishes the same
result as repmat(A,M,N).
B = repmat(A,[M N P ...]) tiles the array
A to produce an
M-by-N-by-P-by-... block
array. A can be N-D.
repmat(A,M,N) for scalar A
is commonly used to produce an M-by-N matrix
filled with values of A.
Examples
Simple examples of using repmat are
repmat(randumat(2,2),2,3)
repmat(ureal('A',6),[4 2])
Version History
Introduced before R2006a