Data Builder Help

The Data Builder enables users to define mathematical data functions that depend on columns in a data table. Data function columns are immediately added to the table and become available as input to other data functions. Data functions may also depend on one or more parameters.

Functions and parameters are defined by entering expressions that are "parsed" (interpreted) by the OSP parser. The values of parameters are constants while those of functions depend on data variables such as x, y, t, etc. The parser recognizes the following elements:

abs(x) acos(x) acosh(x) asin(x) asinh(x) atan(x) atanh(x) atan2(x,y) ceil(x) cos(x)
cosh(x) exp(x) frac(x) floor(x) int(x) log(x) max(x,y) min(x,y) mod(x,y) random(x)
round(x) sign(x) sin(x) sinh(x) sqr(x) sqrt(x) step(x) tan(x) tanh(x)

Table 1 Mathematical functions recognized by the OSP Parser

How to use Data Builder

Data Builder displays data functions and their associated parameters in tables with Name and Expression columns. To create a new parameter or function, click the appropriate Add button.

To edit a name or expression, double-click its table cell (gray cells cannot be edited). Names must be unique and can contain no spaces or mathematical symbols. Expressions must be valid mathematical expressions parsable by the OSP parser.

When editing an expression, the names of all available variables are listed in blue in the status bar below the tables. Variables for parameter expressions include only other parameters, while variables for data function expressions also include table column names (e.g., t, x, y in the figure below). In the example shown, the "Ug" function (gravitational potential energy) may depend on any or all of the 2 parameters and 23 data columns in the list. The entry "m*g*y" is thus a valid expression.

If an invalid expression is entered into a cell the cell turns red and an error message is displayed in the status bar. For example, the expression "mgy" is invalid since the multiplication operators (*) have been omitted. Circular references also result in an error condition.

Data Builder includes several features designed to help students build, modify and compare functions quickly:

  1. All edits are undoable and redoable making it easy to quickly flip back and forth between two function expressions or parameter values.
  2. Single or multiple table rows can be copied or cut to the clipboard for pasting into other tables.
  3. Variables names in the status bar turn red when the mouse is moved over them and can then be inserted directly into expressions by clicking them.