Wave:Calculator

From BlueM
Revision as of 17:32, 16 April 2021 by Froehlich (talk | contribs) (Created page with "{{Wave_nav}} The Calculator analysis function performs mathematical operations on time series. The mathematical operations to be performed are entered as a formula or mathe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Wave.png Wave | Development

The Calculator analysis function performs mathematical operations on time series.

The mathematical operations to be performed are entered as a formula or mathematical expression. The formula is individually applied to each of the timestamps contained in the series that were selected for the analysis. The result is a new time series.

The following mathematical operators are supported:

  • (): Parenthesis
  • +: Addition operator e.g. 3 + 2
  • -: Subtraction operator e.g. 3 - 2
  • *: Multiplication operator e.g. 3 * 2
  • /: Division operator e.g. 3 / 2
  • %: Modulus operator e.g. 3 % 2 (divides the two numbers, but returns the remainder)
  • ^: Exponent operator e.g. 3 ^ 2
  • ABS: Returns the absolute of a number e.g. ABS(-3)
  • SIN: Returns the sine of a number e.g. SIN(3.14)
  • COS: Returns the cosine of a number e.g. COS(3.14)
  • TAN: Returns the tangent of a number e.g. TAN(3.14)
  • LOG: Returns the base 10 logarithm of a number e.g. LOG(3)
  • LOGN: Returns the natural logarithm of a number e.g. LOGN(4)

Time series selected for this analysis can be added to the formula as variables either by entering the letter representing the time series manually or by double-clicking the time series in the list box.

The calculation only results in a value for those timestamps that are common to all of the time series selected for analysis. If a timestamp is missing in one or more time series or the value of one or more time series is NaN for a timestamp, the resulting time series will have a NaN value for this particular timestamp.

Examples:

  • 100 (without any variables):
results in a time series with the value of 100 for each timestamp
  • A / 100 (where A is a time series):
results in a time series where all values of A are divided by 100
  • A + B (where A and B are time series):
results in a time series where the values of A and B are added to together for each common timestamp
  • (2 * A) + LOG(B) - ABS(C) (where A, B and C are time series):
complex calculation with multiple time series

Note: The Math Parser .NET library is used for parsing and evaluating the mathematical expression.