PsiLAB Help Manual
Page
Section:
Basic Matrix functions
Name:
||<->
Subtract the elements of the two matrices a and b.
The result is stored in a new allocated matrix c.
c.{i,j,k,...} <- a.{i,j,k,...} - b.{i,j,k,...}
Both matrices a and b must have the same size and dimension. The resulting matrix c is of the same size, type and dimension.
Supported types: [ int,float,complex ]
[ c:('a, 'b, 'c) Matrix.t ] =
a:('a, 'b, 'c) Matrix.t ||<->
b:('a, 'b, 'c) Matrix.t
Example:
[] let i = imatrix ~dim:[50;40] ~rand:[1000] () ;;
val i : (int, '_a, '_b) Matrix.t = <abstr>
[] let j = imatrix ~dim:[50;40] ~rand:[1000] () ;;
let j = imatrix ~dim:[50;40] ~rand:[1000] () ;;
[] let c = i ||<-> j ;;
val c : (int, '_a, '_b) Matrix.t = <abstr>
Printed by PsiLAB