repmat

发布时间:2025-09-11 00:02

Main Content

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

How useful was this information?

Unrated

1 star

2 stars

3 stars

4 stars

5 stars

网址:repmat https://klqsh.com/news/view/233337

相关内容

repmat
MATLAB高手必看:详解repmat函数,轻松实现数组复制

随便看看