MATLAB Functions Help Desk

permute

Purpose

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    Inverse permute the dimensions of a multidimensional array



[ Previous | Help Desk | Next ]