abs

Absolute value.

Syntax

abs(expr)

Argument

expr
A valid scalar, vector, or matrix expression.

Example

Templex Expression Result
{abs(3)} 3
{abs( {-1, 0, 1} )} 1, 0, 1
{abs( { {-1, 0, 1},{-2, -3, -5} } )} {1, 0, 1},{2, 3, 5}
Curve Math Vectors Result
x = c1.x

y = abs(c1.y)

Given c1, a curve is created which is the absolute value of y vs. x.

Comments

If expr is a scalar, the result is a scalar which is the absolute value of expr.

If expr is a vector or matrix, the result is a vector or matrix which contains the absolute values of the elements in expr.