Mathematical
The following functions are supported in Synthetic Variables mathematical expressions. These functions receive a variable's time-series data as arguments.
ceil(x)
Returns the smallest integer greater than or equal to each element in the variable x. The ceil function always rounds up to the nearest integer.
floor(x)
Returns the largest integer less than or equal to x.
round(x,n)
Returns each element in the variable x rounded to n digits after the decimal point. By default, n is 2 in Ubidots.
sin(x)
Returns the sine, in radians, of each element in the variable x.
cos(x)
Returns the cosine, in radians, of each element in the variable x.
tan(x)
Returns the tangent of each element in the variable x, where x is in radians.
arcsin(x)
Returns the inverse sine, in radians, of each element in the variable x.
arccos(x)
Returns the inverse cosine, in radians, of each element in the variable x.
arctan(x)
Returns the inverse tangent, in radians, of each element in the variable x.
arctan2(x,y)
Returns the inverse tangent, in radians, using the input variables x and y as Cartesian coordinates. Note: It only performs the operation on values with the same timestamp.
sinh(x)
Returns the hyperbolic sine of each element in the variable x.
cosh(x)
Returns the hyperbolic cosine of each element in the variable x.
tanh(x)
Returns the hyperbolic tangent of each element in the variable x.
arcsinh(x)
Returns the inverse hyperbolic sine, in radians, of each element in the variable x.
arccosh(x)
Returns the inverse hyperbolic cosine, in radians, of each element in the variable x.
arctanh(x)
Returns the inverse hyperbolic tangent, in radians, of each element in the variable x.
poly(x,c1,c2,c3...)
Returns the result of a polynomial expression of order n, where n is the number of constants minus 1, for each element in the variable x.
exp(x)
Returns the exponential of each element in the variable x.
log(x,base)
Returns the logarithm of each element in the variable x. By default, the base is Euler's number.
abs(x)
Returns the absolute value of each element in the variable x.
sqrt(x)
Returns the square root of each element in the variable x.
x and y represent variables as time series or dots.
Last updated
Was this helpful?