I have a matrix (say A) of dimension (k1, k2). I want to replicate it N times and save it into a 3D array or cube called B. As a result, the dimension of B will be (k1, k2, N).
In R, I did the following to do that:
B <- replicate(N, A)
I wonder if there is a function in Armadillo that can do that. Or, is looping the only way?
Thank you!