The absolute value of the arguments. |
||
Syntax |
a = Abs(m) |
|
Argument |
Name |
Description |
m |
A real or complex scalar, vector or matrix. |
|
Output |
Name |
Description |
a |
The absolute value or magnitude of each entry. |
|
Example 1 |
Find the absolute values of elements in a matrix. |
|
Syntax |
||
C = Abs([1,-2,-3,4]) |
||
Result |
||
C = 1 2 3 4 |
||
Example 2 |
Find the magnitude of a complex value. |
|
Syntax |
||
C = Abs(3 + 4i) |
||
Result |
||
C = 5 |
||
See Also: |