Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 4 Expressions > 4.12 Expression Operator / Function Reference

4.12.3 Math operators

Scroll Prev Top Next More

Expressions support the standard mathematical operators:

+, -, *, /

Add, Subtract, Multiply, Divide

%, ^

Modulus, Power

()

Parenthesis

These functions work both on scalar values and arrays of values.  

Examples:

3 + 2 returns 5

{3,5} + 2 returns {5,7}   2 is added to both elements of the array

{3,5} + {2,1} returns {5,6}  each element of the array is added to the matching element of the other

{3,5,6} + {2,1} returns {5,6}   the longer array is truncated to the size of the shorter array before adding

8 % 3 returns 2    2 is the remainder of 8/3.

2 ^ 4 returns 16   2 raised to the 4th power is 16.  

2 ^ 0.5 returns 1.414    2 raised to the 0.5 power is the same as the square root of 2.