Section 3: Test subroutine library reference
S530 Parametric Test System Test Subroutine Library User's Manual
3-28
S530-907-01 Rev. A / September 2015
fnddat
This subroutine searches an array and returns a new array.
Usage
void fnddat(double
*x
, int
npts
, double
*y
, int
npts1
, double
x1
, double
x2
, double
*xnew
, int
np1
, double
*ynew
, int
np2
, int
*np
, char
code
)
x
Input
Input x array
npts
Input
Number of points in the input array
y
Input
Input y array
npts1
Input
Number of points in the input array
x1
Input
Minimum valid point
x2
Input
Maximum valid point
xnew
Output
Screened x array
np1
Input
Number of points in the output array
ynew
Output
Screened y array
npt2
Input
Number of points in the output array
np
Output
Number of points in the output array
code
Input
Search
"x"
or
"y"
data array
Returns
Output
The new array
Details
This subroutine searches a data set of x and y values for a specified range of data and returns two
new arrays with the screened data. Use this routine in other routines to remove unwanted or bad
points from measured data.
The
x
,
y
,
xnew
, and
ynew
parameters are all adjustable dimensioned arrays. The calling routine
should dimension them all the same.
The
code
parameter searches either the x data or y data. For example, in most measurement
routines, either the voltage or current is fixed, and the other variable is measured. The measured
variable is normally what is screened.
Example
fnddat(&x, npts, &y, npts1, x1, x2, &xnew, np1, &ynew, np2, &np, code)