NAME

bin_vec - binarize vector on interval

lim_vec - limit vector components to interval

PROTOTYPES

unitptr bin_vec(int n, float fMin, float fMax, unitptr uHost)

unitptr lim_vec(int n, float fMin, float fMax, unitptr uHost)

ARGUMENTS

int n
vector dimension
float fMin
lower limit of interval
float fMax
upper limit of interval
unitptr uHost
host unit

INTERFACE OF CREATED UNIT:

X_in[n]:
input vector (packed field, if n<0 )
CTL_in[3]:
control field. A value of CTL_in[0]=0 switches the unit off. CTL_in[1] and CTL_in[2] hold the limits for the interval that is used for determining the result values. The values of CTL_in[1] and CTL_in[2] are initialized to fMin and fMax.
X_out[n]:
result vector (packed field, if n<0 ).

EXECUTION OF THE CREATED UNIT:

For lim_vec, the result values are determined by

    X_out[i] = X_in[i], if CTL_in[1] <= X_in[i] < CTL_in[2]
               CTL_in[1] if X_in[i] < CTL_in[1]
               CTL_in[2] if X_in[i] >= CTL_in[2]

For bin_vec, the result values are determined by

    X_out[i] = 1, if CTL_in[1] <= X_in[i] < CTL_in[2]
               0, otherwise

SEE ALSO:

thr_vec, threshold

FILE

/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../foldersrc/nst_vector.c