HP MLIB User's Guide Vol. 1 7th Ed.
Chapter 2 Basic Vector Operations 77
Right sided vector clip SCLIPR/DCLIPR/ICLIPR
Name SCLIPR/DCLIPR/ICLIPR
Right sided vector clip
Purpose Given scalar b and a vector x of length n, these subprograms form the vector y
by the right-sided clip operation
The vectors can be stored in one-dimensional arrays or in either rows or
columns of two-dimensional arrays, and the indexing through the arrays can be
either forward or backward.
Usage VECLIB:
INTEGER*4 n, incx, incy
REAL*4 b, x(lenx), y(leny)
CALL SCLIPR(n, b, x, incx, y, incy)
INTEGER*4 n, incx, incy
REAL*8 b, x(lenx), y(leny)
CALL DCLIPR(n, b, x, incx, y, incy)
INTEGER*4 n, incx, incy, b, x(lenx), y(leny)
CALL ICLIPR(n, b, x, incx, y, incy)
VECLIB8:
INTEGER*8 n, incx, incy
REAL*4 b, x(lenx), y(leny)
CALL SCLIPR(n, b, x, incx, y, incy)
INTEGER*8 n, incx, incy
REAL*8 b, x(lenx), y(leny)
CALL DCLIPR(n, b, x, incx, y, incy)
INTEGER*8 n, incx, incy, b, x(lenx), y(leny)
CALL ICLIPR(n, b, x, incx, y, incy)
Input n Number of elements of vectors x and y to be used. If
n ≤ 0, the subprograms do not reference x or y.
b The scalar b.
x Array of length lenx = (n−1)×|incx|+1 containing the
n-vector x.
incx Increment for the array x:
y
i
x
i
if x
i
b<
b if x
i
b≥
i 12… n.,, ,=
=