Versions Compared

Key

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

...

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. In an if statement the following symbols can be used:

Code Block
>

which means greater than and

Code Block
<

which means less than. For instance in the expression

Code Block
 if(X > 3, 10.5, -2) + 5*a 

the if statement will be replaced with 10.5 or -2, depending on the value of the variable 'X'. In this case if X is greater than 3, then the if statement is replaced with 10.5. If X is equal to or less than 3, then the if statement is replaced with -2. The following symbols can be used in an if statement:

Code Block
 >  

greater than

Code Block
 >= 

greater than or equal to

Code Block
 <  

less than

Code Block
 <= 

less than or equal to

If statements can also be nested, e.g.

Code Block
 if(m > b, 3, if(m > a, 2, 1)) 
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.

...