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 immediately below the popup editor field. You can enter variable names and operators using the keyboard and/or mouse. To insert a variable with the mouse, move the mouse over the list until the desired variable turns red, then click.

Variables for parameter expressions include only other parameters, while variables for data function expressions also include all other columns in the data table (e.g., t, x or y). For example, if the parameters "m" and "g" are defined and the table includes a column named "y", then the entry "m*g*y" is a valid expression for gravitational potential energy.

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 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 Data Builder tables.