Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Analytics and Notifications for PI System Explorer (PI Server 2018)

Curve

  • Last UpdatedJan 11, 2023
  • 1 minute read

For a given x, returns the value of a piecewise linear interpolation function defined by the set of n points (x1,y1)...(xn,yn).

Syntax

Curve(x, (x1,y1) (x2,y2) … (xn,yn))

Arguments

  • x

    Expression evaluating to a number

  • x1, y1

    The first point on the curve. The xi's and yi's are numeric constants evaluated at compile time. The values set for xi's must be in ascending order.

Returns

For a given x, returns the value of a piecewise linear interpolation function defined by the set of n points (x1,y1)...(xn,yn). If the value of x is less than x1 then y1 is returned and if it is greater than xn, yn is returned. The points are assumed to be ordered in the x direction from smallest to largest.

Exceptions

If the value of x is not an integer or real number, an error value is returned

Example

  • Curve(3, (0,100) (100,0))

    [Returns 97]

  • Curve('att1', (25,25) (75,75))

In This Topic
TitleResults for “How to create a CRG?”Also Available in