TRANSPOSE
Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also
The TRANSPOSE function returns the transpose of Array. If an optional permutation vector is provided, the dimensions of Array are rearranged as well.
Syntax
Result = TRANSPOSE( Array [, P] )
Return Value
Returns the reflection of the array along a diagonal.
Arguments
Array
The array to be transposed.
P
A vector specifying how the dimensions of Array will be permuted. The elements of P correspond to the dimensions of Array; the ith dimension of the output array is dimension P[i] of the input array. Each element of the vector P must be unique. Dimensions start at zero and can not be repeated.
If P is not present, the order of the dimensions of Array is reversed.
Keywords
None.
Examples
Note
Also see Transposing Images (Image Processing in IDL) for a more extensive example.
Example 1
Print a simple array and its transpose by entering:
IDL prints:
Example 2
This example demonstrates multi-dimensional transposition:
IDL prints:
Version History