Math on Data

From Emergent

Jump to: navigation, search

How to perform various math operations on DataTable columns of data in Programs.

  • drag a math() program element from the Misc Fun program toolbox (left hand side of screen).
  • click on the object type and select taMath_float or _double, depending on your column's data type.
  • click on the method button, and use the category selector at the top to choose the type of function you are looking for -- anything starting with vec_ will operate on vector data (you can just type vec_ into the search field at the bottom of the selector to see them all).
  • enter <mydatatable>.data.<mycolname>.ar as the expression for the vector to operate on (replace <mydatatable> etc with appropriate names from your data table).
  • some functions operate in place (e.g., Norm/vec_norm_max) and others generate an output data table. For those that generate an output of the same size as the input vector, you can just duplicate your column of data in your data table and use that for the output.

Reference info on math operations: taMath_float

Personal tools