PsiLAB Help Manual Page

Section: Basic Matrix functions

Name: matop

Evaluate for each matrix element of matrix a the function f and store the result in the new matrix b. The new matrix b will be allocated automatically.

[ b:('a, 'b, 'c) Matrix.t ] = matop
func:('a -> 'a)
a:('a, 'b, 'c) Matrix.t

The function must be of the form y=f(x). The matrix can have one of the supported matrix types:
[ int float complex ]

Example:
[] let f = fmatrix ~const:[1.0,2.0,3.0;4.0,5.0,6.0] () ;; 
[] let sinf = matop sin f ;; 

Printed by PsiLAB