Scripting > Math Functions


Select a Paired Data Curve by Curve Number

setCurve(integer curveNumber)

Select, by curve number, the paired data curve for performing subsequent arithmetic operations or math functions.  By default, a paired data set loaded from file has all curves selected.

A paired data set may contain more than one set of y-values.  However, a user may wish to modify only one curve of the data set.  For example, using the function ".add( 2.0 )" would by default add 2.0 to all y-values for all curves.  The setCurve() call can be used to limit the operation to just one selected set of y-values.  The function sets a curve index internal to the paired data set.  The option is to select one curve or all curves.

Curve numbering begins with “0.”  If a paired data set has two curves, the first curve is selected by, “setCurve(0).”  To select the second curve, use “setCurve(1).”

All curves in a paired data set are selected by setting curveNumber to -1.

See also:  setCurve( String curveName)
Parameters:

curveNumber – An integer specifying the curve to set as the selected curve.  Curve numbering begins with 0.  Set to –1 to select all curves.

Example: ruleCurve.setCurve(-1)

Returns:  Nothing