Flatten Matrix in Row Major Order in Arbitrary Dimensions
109 views (last 30 days)
David Goodmanson on 15 Jun 2019
I'm not sure this is what you are looking for, but
B = permute(A,[6 5 4 3 2 1]); % (however many dimensions there are)
B = B(:);
has a lot of the right properties.