-3

Could you help me please to repeat matrix. for example if I have matrix(A) and I want to create a big matrix(B) contains three matrices of matrix(A) in the row and two matrices in the column.

2 Answers2

1

In MatLab, you want to use repmat().

In Python, use the Numpy function, tile(a, (m, n)).

You should check out this post: https://stackoverflow.com/a/1724410/515559

Community
  • 1
  • 1
kedmond
  • 53
  • 1
  • 5
  • Upvoted as you did provide the right answer, but would recommend you to avoid information that is not directly relevant. (An explanation of how to do it in Python, whilst the asker asks about Matlab). It can be a bit distracting. – Dennis Jaheruddin Nov 06 '14 at 10:41
  • Yeah, you're right, sorry. – kedmond Nov 06 '14 at 10:47
1

The MATLAB function repmat does exactly what you need:

B = repmat(A,3,2);

For more details see the MATLAB documentation

hbaderts
  • 14,136
  • 4
  • 41
  • 48