HyperMath

Abs

Abs

Previous topic Next topic No expanding text in this topic  

Abs

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

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:

Fix

Mod

Rem

Sign