Inverse permute dimensions of N-D array
A = ipermute(B,order)
A = ipermute(B,order) is
the inverse of
the dimensions of
B so that
B has the same values
A but the order of the subscripts needed to
access any particular element are rearranged as specified by
All the elements of
order must be unique.
Create a 2-by-2-by-3 array
A, and compute its permutation
P according to the vector
v. The inverse permutation of
P is equivalent to the original array
A = rand(2,2,3); v = [3 2 1]; P = permute(A,v); IP = ipermute(P,v); isequal(A,IP)
ans = logical 1
a generalization of transpose (
.') for multidimensional
This function supports tall arrays with the limitation:
Permuting the tall dimension (dimension one) is not supported.
For more information, see Tall Arrays.
Usage notes and limitations:
Does not support cell arrays for the first argument.
See Variable-Sizing Restrictions for Code Generation of Toolbox Functions (MATLAB Coder).