Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For instance "X1 + X2 * 3" (without the quotes). In the expression input variables or coefficients can be referenced using their id, e.g. "X1 + a" where "X1" is the variableId of a variable defined elsewhere and "a" is the id of a coefficient defined in a coefficientSet. A variableId or coefficientId should not start with a numerical character and should not contain operators. The following operators can be used in the expression: +, -, /, *, ^ Furthermore the following functions can be used in the expression: sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, log, ln, exp, sqrt, abs, pow. Furthermore the function isMissing can be used to check if an input value is missing (NaN), e.g. for the expression "isMissing(X)" the result will be 1 when X is missing and the result will be 0 when X is not missing. Furthermore "pi" in lowercase letters is recognised as a the standard mathematical constant π. This means that the user cannot use variables or coefficients with id "pi".

...

To write a missing value (NaN) in the expression, you can use "10/0" can be used.

Furthermore it is possible to use "if statements" in the expression. This can e.g. be used to get one output value if X is greater than 3 and get another output value if X is equal to or less than 3. For instance in the expression

...