|
|
Sign
When applied to a number or an array of numbers, Sign produces the sign of the number or an array for each element of which is the sign of the corresponding element of the input array, respectively.
Structure (for scalars): if X > 0 then signX = 1 if X < 0 then signX = -1 otherwise signX = 0
Examples: sign(5) = 1 sign(-3.2) = -1 sign(0) = 0 sign((5, -3.2, 0)) = (1, -1, 0)
Special compound model elements
|