PsiLAB Help Manual Page

Section: High level matrix functions

Name: transpose

Transpose a matrix.
Only applicable to 2 dimensional matrixes. Special case: Vector. Row and column elements are interchanged. The result is stored in the new allocated matrix c .
[ c:('a, 'd, 'e) Matrix.t ] = transpose
a:('a, 'b, 'c) Matrix.t

Examples:
[] let a = fmatrix ~dim:[5;3] ~rand:[1.0] () ;; 
val a : (float, '_a, '_b) Matrix.t = <abstr> 
[] let t = transpose a ;; 
val t : (float, '_a, '_b) Matrix.t = <abstr> 
[] dim2 t;; 
- : int array = [|3; 5|] 
[] let t = !<-|> a ;; 	 (* shortcut *) 
val t : (float, '_a, '_b) Matrix.t = <abstr> 


Printed by PsiLAB