Expression SyntaxΒΆ

The expression is parsed using NCalc library, a mathematical expression evaluator library for .NET, see https://ncalc.codeplex.com/. The independent variables depend on the actual context to be used. For example, when defininf custom expressions as in Adding custom signals the independent variable is interpreted as a time variable and is denoted by t. Other letters are used for independent variables in other places. The proper choice of the independent variable is allways described clearly and visibly.

All basic arithmetic operations can be used, and basic mathematical functions are supported. Please note that mathematical functions are written using first upper-case letter, sin it is Sin not sin, Exp not exp, etc. The suported functions can be found at https://ncalc.codeplex.com/wikipage?title=functions&referringTitle=Home.

Some basic mathematical constants are also pre-defined. The expression evaluator will substitute any occurance of the symbol Pi with an approximate value of \(\pi\) (which is 3.14159265359). Similarly, eany occurance of symbol E will be replaced by approximate value for the base of the natural logarithm, \(e\), which is approximately 2.71828182846.