transpose
- Date:
06-19-2023
NAME
TRANSPOSE - Transposes an array of rank two
SYNOPSIS
TRANSPOSE ([MATRIX=]matrix)
STANDARDS
Fortran
DESCRIPTION
The TRANSPOSE intrinsic function transposes a two-dimensional array. It accepts the following argument:
- matrix
May be of any type and must have rank two.
TRANSPOSE is a transformational function. The name of this intrinsic cannot be passed as an argument.
RETURN VALUES
The result is an array of the same type and type parameters as matrix, with rank two, and shape (n, m), where (m, n) is the shape of matrix. Element (i, j) of the result has the value matrix(j,i), where i = 1, 2, …, n and j = 1, 2, …, m.
EXAMPLES
Assume that array A is as follows:
| 1 2 3 |
| 4 5 6 |
| 7 8 9 |
TRANSPOSE(A) yields the following value:
| 1 4 7 |
| 2 5 8 |
| 3 6 9 |