I am trying to turn a 3 dimensional array "upside-down" as:
I have tried the inverse
function, but if we look at the inverse operation in mathematical terms, it gives us another result. I need to turn without changing the data in the array. How to do that?
To split the 3-dimensional array (A x B x C
) into A-sub-array (2d, B x C
) I have used squeeze
: k=squeeze(array(n,:,:))
. Now I have a 2-dimensional array of size B x C
. How to put it back together (in 3 dimensional array)?