Controlled reorganisation of a 3D matrix

44 Views Asked by At

This is a noob question I guess, but I want to reshape a 3D matrix in a way that the planes of the 3rd dimension are arranged consecutively on the 1st dimension. The idea is that given a matrix A(720x360x120) I can reshape it into a 86400x360 matrix. Using reshape doesn't work as it just seems to arrange the numbers consecutively. I can just do it in tests using cat:

Being A_test (4x3x2)

B_test=cat(1,A_test(:,:,1),A_test(:,:,2));

But doing that 120 times is a bit too much. I thought I could use a for loop for it, but I don't quite see how.

Any help would be very appreciated

Thanks in advance

Maria

0

There are 0 best solutions below