HyperWorks Solvers

SIGN

SIGN

Previous topic Next topic No expanding text in this topic  

SIGN

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

Format

SIGN (a1,a2)

Description

The SIGN function transfers the sign of a2 to the magnitude of a1.

Example

VARIABLE/23, FUNCTION=10*SIGN(DM(24,33),VZ(24,33))

When VZ(24,33)>0, the value of VARIABLE/23 is +10*DM(24,33).

When VZ(24,33)<0, the value of VARIABLE/23 is -10*DM(24,33).

Arguments

a1

Any valid function expression or constant.

a2

Any valid function expression or constant.

Definition

SIGN(a1,a2) =  ABS(a1) if a2 > 0

SIGN(a1,a2) = -ABS(a1) if a2 < 0

Comments

The SIGN function is discontinuous.  Use this function with care to avoid creating expressions that are discontinuous.

See Also:

Functions

Command Statements

Model Statements

Notation and Syntax