1function C = repmat (G, m, n)
2%REPMAT replicate and tile a matrix.
3% C = repmat (G, m, n)  % constructs an m-by-n tiling of the matrix G
4% C = repmat (G, [m n]) % same as C = repmat (A, m, n)
5% C = repmat (G, n)     % constructs an n-by-n tiling of the matrix G
6%
7% See also GrB/kron, GrB.kronecker.
8
9% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
10% SPDX-License-Identifier: GPL-3.0-or-later
11
12G = G.opaque ;
13type = gbtype (G) ;
14
15if (nargin == 3)
16    R = ones (m, n, 'logical') ;
17else
18    R = ones (m, 'logical') ;
19end
20op = ['2nd.' type] ;
21C = GrB (gbkronecker (R, op, G)) ;
22
23