#
PsiL_{A}B Help Manual
Page

## Section:
Basic Matrix functions

## Name:
fmatrix_get_byname

**Get a matrix by name **

This function concatenates an already allocated matrix (with the *fmatrix_byname *function) with a Psilab (Caml) variable, identified by a unique name string.

[ mat:(float, 'a, 'b) Matrix.t ] = **fmatrix_get_byname **

name:string

?fill:float list

?rand:float list

?copy:(float, 'a, 'b) Matrix.t list

?const:'a list

()

The *fill *argument can be used to fill the matrix with a constant value. The *rand *argument initializes all matrix elements with a random number, those maximal value is determined by this argument. The *copy *argument can be used to copy the content of another matrix to this matrix. And finally, the *const *argument can be used to initialite this matrix with either a constant vector or a constant 2 dimensional matrix.

See also *fmatrix_byname. *

Example:

(* allocate a new matrix named "mymatrix" *)
[] fmatrix_byname ~dim:[100;100] ~create:["mymatrix"] ();;
[] let iv () =
(* fmat gets the matrix *)
let fmat = fmatrix_get_byname "mymatrix" () in
...
(* if the matrix is no longer used: *)
[] fmatrix_byname ~destroy:["mymatrix"] () ;;

Printed by PsiL_{A}B