Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab manual >> Matlab to Scilab Conversion Tips > Matlab-Scilab equivalents > R > repmat (Matlab function)

repmat (Matlab function)

Replicate and tile an array

Matlab/Scilab equivalent

Matlab Scilab
repmat
No equivalent

Particular cases

There is no Scilab equivalent function for Matlab repmat but it can be replaced by the following expressions (considering m and n being real values):

repmat(A,m) with m a scalar:

can be replaced by ones(m,m).*.A if A is of Double type, by ones(m,m).*.bool2s(A) if A is of Boolean type and by asciimat(ones(m,m).*.asciimat(A) if A is of String type

repmat(A,m) with m a vector:

can be replaced by ones(m(1),m(2),...).*.A is of Double type, by ones(m(1),m(2),...).*.bool2s(A) if A is of Boolean type and by asciimat(ones(m(1),m(2),...).*.asciimat(A) if A is of String type

repmat(A,m,n):

can be replaced by ones(m,n).*.A if A is of Double type, by ones(m,n).*.bool2s(A) if A is of Boolean type and by asciimat(ones(m,n).*.asciimat(A) if A is of String type

<< rem (Matlab function) R reshape (Matlab function) >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jan 26 16:23:48 CET 2011