SIGN
- Last UpdatedMar 03, 2025
- 1 minute read
The SIGN() function produces a stream of results indicating the sign of a stream's values.
Syntax
|
Format |
Stream = SIGN( Stream ) |
|
Arguments |
Stream - A stream of values |
|
Description |
Returns a stream that is a copy of the input stream, with all values replaced based on their sign. Positive values are replaced with 1, negative values are replaced with -1, and zero values remain zero. |
Example
The following expression returns the sign of the value of the difference in flow rates between two pumps.
SIGN(PLPReactor.PLPWIN2019.VectorTags.VectorX -PLPReactor.PLPWIN2019.VectorTags.VectorY )
For each data point in the results, the value will be:
-
-1 when VectorY has a higher value
-
0 when the values are equal
-
1 when VectorX has a higher value.
