mabs ( m -- m' )


Vocabulary
math.matrices

Inputs
ma matrix


Outputs
m'a matrix


Word description
Compute the absolute value (abs) of each element in the matrix.

Notes
This word is the companion variant of mneg.
This word is intended for use with "flat" (2-dimensional) matrices.
This word assumes that elements of the input matrix are compatible with the following words:
abs ( x -- y )


Examples
USING: math.matrices prettyprint ; { { -5 -9 } { -15 17 } } mabs .
{ { 5 9 } { 15 17 } }


Definition