abs(m)

The abs(m) function returns the absolute value of each element in the array m.

Examples

OML

>> m=[1 -2;-3 4]

1 -2

-3 4

>> abs(m)

1 2

3 4

Block

abs function