repmat

repmat

Replicate and tile array




Syntax

B = repmat(A,n) 

B = repmat(A,sz1,sz2,...,szN) 

B = repmat(A,sz) 




Description


B = repmat(A,n) returns an n-by-n tiling of A. The size of B is size(A) * n

B = repmat(A,sz1,sz2,...,szN) specifies a list of scalars, sz1,sz2,...,szN, to describe an N-D tiling of A. The size of B is [size(A,1)*sz1, size(A,2)*sz2,...,size(A,n)*szN]. For example, repmat([1 2; 3 4],2,3) returns a 4-by-6 matrix.

B = repmat(A,sz) specifies a row vector, sz, instead of a list of scalars, to describe the tiling of A. This syntax returns the same output as the previous syntax. For example, repmat([1 2; 3 4],[2 3]) returns the same result as repmat([1 2; 3 4],2,3).

你可能感兴趣的:(repmat)