Abs

From VLECK
Jump to: navigation, search

Returns the Absolute values

Syntax

Result = Abs( Values);

Return Value

Abs returns the absolute values of all elements of the matrix or structure Values. For complex numerical values Abs returns |value|. The return value is a matrix or structure of the same shape as the argument Values.

Parameters

Values matrix or structure with numerical values


Example


> A=-1,2,-3;

A=-1,2,-3:

-1 2 -3

> R=Abs(A);

R=Abs(A):

1 2 3

Example


> A=3+sqrt(-1)

A=3+sqrt(-1):

3.000000+1.000000i

> R=Abs(A);

R=Abs(A):

3.162278