PsiLAB Help Manual Page

Section: Basic Matrix functions

Name: matparam

Returns all parameter of matrix a.

[ (matdim:int) * (matsize:(int, 'b, 'c) Matrix.t) * (matelem:int) ] =
matparam (a:('a, 'b, 'c) Matrix.t)

The returned tuple consists of :

matdim: dimension of the matrix
matsize: vector with sizes for each dimension
matelem: number of elements in the matrix (sum of matsize)

Example:

[] let f = fmatrix ~dim:[10;20;30] () ;; 
[] let (d,s,e) = matparam f ;; 
- : int * (int, '_a, '_b) Matrix.t * int = 3, <abstr>, 6000 
[] s.{1} 
- : int = 10 

Printed by PsiLAB