Use the Signal Calculator computed channel to create logical, arithmetic or trigonometric expressions combining other channels, functions and constants.
Double-click or drag and drop a channel or operator to add it to the expression. Alternatively, build the expression using keyboard entry. All operators and referenced input channels are case sensitive.
NOTE
If using drag and drop to select channels and functions/operators, the item will be dropped at the current position of the cursor and not where the mouse pointer is.
The output is 64-bit float and either arithmetic (floating point) or logical (Boolean) depending on the expression.
All input channels to a single Signal Calculator channel must have the same sample rate, which also determines the computed channel sample rate.
Category | Operator | Syntax | Return |
---|---|---|---|
Logical | > | a > b | TRUE if a is greater than b; else FALSE |
>= | a >= b | TRUE if a is greater than or equal to b; else FALSE | |
< | a < b | TRUE if a is less than b; else FALSE | |
<= | a <= b | TRUE if a is less than or equal to b; else FALSE | |
== | a == b | TRUE if a is equal to b; else FALSE | |
!= | a != b | TRUE if a is not equal to b; else FALSE | |
! | !a | TRUE if a is FALSE; else FALSE | |
&& | a && b | TRUE if a and b are TRUE; else FALSE | |
|| | a || b | TRUE if either a or b are TRUE; else FALSE | |
Arithmetic | ^ | a ^ b | a raised to the power of b |
* | a * b | The product of a and b | |
/ | a / b | The quotient of a and b | |
% | a % b | The modulus of a and b | |
+ | a + b | The sum of a and b | |
- | a - b | The difference of a and b | |
fabs | fabs(a) | The absolute value of a | |
sqrt | sqrt(a) | The square root of a | |
log | log(a) | The natural logarithm of a | |
log10 | log10(a) | The base-10 logarithm of a | |
exp | exp(a) | The exponential function of a | |
sgn | sgn(a) | -1 for a < 0, 1 for a > 0, 0 for a = 0 | |
float | float(a) | a in floating point data type | |
floor | floor (a) | The largest integer less than a | |
ceil | ceil(a) | The smallest integer greater than a | |
Trigonometric (all angles in radians) |
sin | sin(a) | The sine of a |
cos | cos(a) | The cosine of a | |
tan | tan(a) | The tangent of a | |
asin | asin(a) | The arcsine of a in the range [-PI/2, PI/2] | |
acos | acos(a) | The arccosine of a in the range [0, PI] | |
atan | atan (a) | The arctangent of a in the range [-PI/2, PI/2] |