| MATLAB Function Reference | ![]() |
Rearrange the dimensions of a multidimensional array
Syntax
Description
B = permute(A,order)
rearranges the dimensions of A so that they are in the order specified by the vector order. B has the same values of A but the order of the subscripts needed to access any particular element is rearranged as specified by order. All the elements of order must be unique.
Remarks
permute and ipermute are a generalization of transpose (.') for multidimensional arrays.
Examples
Given any matrix A, the statement
The following code permutes a three-dimensional array:
See Also
| perms | persistent | ![]() |