Intersections (FPScript)
Determines the exact intersecting points of two data sets or the level crossings of one data set.
Syntax
Intersections(DataSet1, DataSet2)
or
Intersections(DataSet, Level)
The syntax of the Intersections function consists of the following parts:
Part |
Description |
---|---|
DataSet1 |
The first data set whose intersecting points with the second data set are to be determined. Permitted data structures are data series, data matrix, signal und signal series. All numeric data types are permitted. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
DataSet2 |
The second data set. Permitted data structures are data series und signal. All numeric data types are permitted. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
DataSet |
The data set whose level crossings are to be determined. Permitted data structures are data series, data matrix, signal und signal series. All numeric data types are permitted. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
Level |
The level. Permitted data structures are scalar value. All numeric data types are permitted. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
Remarks
To calculate the intersecting points, two neighboring points from each of the two data sets are examined, and the intersecting point of the line segments defined in this way are calculated. If the line segments intersect, then the intersection point is included in the result. Data points with void values are ignored.
The first data set can also be specified as a signal series or data matrix. In this case, the intersecting points are determined column by column and passed as a space curve.
If a scalar value is specified as a second argument, all crossings of the first data set through the given level are calculated.
The X values of the data sets should both be either ascending or descending. For the remaining cases, the calculation time increases quadratically with the number of data points.
For complex data types the absolute value is formed.
Available in
FlexPro Basic, Professional, Developer Suite
Examples
Intersections(Signal(Sin(2. * PI * (1000, 0, 0.01)), 0.01), Signal(Sawtooth(2. * PI * (500, 0, 0.02), 0.5), 0.02))
Calculates the intersecting points of a sinus signal (0.01 sampling rate) and a sawtooth signal (0.02 sampling rate).
Intersections(Signal(Sin(2. * PI * (1000, 0, 0.01)), 0.01), 0.5)
Calculates all crossings of a sinus signal through the level 0.5.