I have a 40×16 matrix or 8 5×16 one below the other i.e. aligned vertically.
I want to get a 5×128 matrix from that such that I align the 8 5×16 matrices horizontally.
is there an efficient/quicker (rather than the hardcoded for loops) way to do this?
I want the individual 5×16 matrices intact.
This should work. Suppose your matrix is
A(40×16).Here’s a way using
reshape:B will have your eight 5×16 matrices next to each other, intact.
And here’s a way without
reshape: