Transpose an array of rank two. Element (i, j) of the result has the value matrix(j, i), for all i, j.
Fortran 95 and later
Transformational function
result = transpose(matrix)
matrix - Shall be an array of any type and have a rank of two.The result has the same type as matrix, and has shape (/ m, n /) if matrix has shape (/ n, m /).