This MATLAB function rearranges the dimensions of A so that they are in the order specified by the vector order.
www.mathworks.com