Reputation: 11
I have two matrices, say A and B, each are 133x365.
I want to create a new matrix which contains the first column of A then the first column of B, second column of A then second column of B, and so on.
I think it is some sort of concatenation but I am not sure how to do it.
Thanks!
Upvotes: 0
Views: 693
Reputation: 23
This should do the trick
reshape(permute(cat(3,A,B), [1 3 2]), [m 2*n]);
where [m,n] = size(A)
Upvotes: 1