MATLAB Function Reference Previous page   Next Page
permute

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

is the same as A'.

For example:

The following code permutes a three-dimensional array:

See Also

ipermute, circshift


Previous page  perms persistent Next page

© 1994-2005 The MathWorks, Inc.