B = repmat(A,[M N P ...]) tiles the array A to produce a multidimensional array B composed of copies of A.
The size of B is
[size(A,1)*M, size(A,2)*N, size(A,3)*P, ...].
a =
0.9849 0.1402
0.1238 0.1523
>> repmat(a,[1,1,3])
ans(:,:,1) =
0.9849 0.1402
0.1238 0.1523
ans(:,:,2) =
0.9849 0.1402
0.1238 0.1523
ans(:,:,3) =
0.9849 0.1402
0.1238 0.1523