Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Elementary Functions > Matrix manipulation > repmat


Replicate and tile an array

Calling Sequence

B = repmat(A,m,n,...)
B = repmat(A,siz)
B = repmat(A,m)



input 2D array.

m, n, ...

integers, number of A blocks for each dimension of B.


vector of integer, each element gives the number of A blocks for corresponding dimension of B.


resulting array form by tiling the A 2D array.


repmat(A,m,n) or similarily repmat(A,[m,n]) returns a large matrix consisting of an m-by- n tiling of copies of A. The size of the result is [size(A,1)*M, size(A,2)*N].

repmat(A,m) creates an m-by- mtiling.

repmat(A,[m n p ...]) tiles the array A to produce a multidimensional array composed of copies of A. The size of the result is [size(A,1)*M, size(A,2)*N, size(A,3)*P, ...]


For now,only arrays of real, integer, boolean, character string, polynomial and rational as well as sparse matrices are supported. This function definition can be extended using overloading mechanism.


repmat(int8([1 0 1;0 1 0]),2,3,2)


Serge Steer, INRIA


Author : Sylvestre LEDRU posted the 19/06/2011 10:51
Function available since Scilab 5.3.1
Reply to this comment
Please login to comment this page

See comments in other languages: Français: 1 comment(s)

Add a comment:
Please login to comment this page.

<< permute Matrix manipulation resize_matrix >>

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Oct 05 12:09:38 CEST 2011