0
votes

I don't think I know tricks to use repmat in Matlab yet. I tried a number of combination and I am not able to achieve what I need.

I have a vector A of size 1 x 20. I just want to stack A to create 3 x 5 x 20 size matrix. Can you please help ?

1
Please have a look through this tutorial and this documentation for repmat.chappjc

1 Answers

2
votes
A = 1:20;
reshape(repmat(A, [15, 1]), [3,5,20])