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 reference 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: +, -, /, *, ^, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, log, ln, exp, sqrt, abs, pow. "pi" in lowercase letters is recognised as a standard constant. This means that the user cannot use variables or coefficients with id "pi".

Furthermore it is possible to use "if statements" in the expression. This can e.g. be used to get one output value if X > 3 and get another output value if X <= 3. In an if statement the following symbols can be used: > which means greater than and < which means less than. For instance in the expression "if(X > 3, 10.5, -2) + 5*a" (without the quotes) the if statement "if(X > 3, 10.5, -2)" will be replaced with 10.5 or -2, depending on the value of the variable 'X'. In this case if X > 3, then the if statement is replaced with 10.5. If X <= 3, then the if statement is replaced with -2.

Coefficient set

Should contain the coefficients that are used in the free format expression. Defined the ids and values of the coefficients here, then reference to the ids of these coefficients in the expression. Make sure that for all the coefficient ids in the free format expression the values are defined here.

...