HP MLIB User's Guide Vol. 2 7th Ed.
602 HP MLIB User’s Guide
STCONV/DTCONV Tapered correlation and convolution
Output y The tapered convolution or correlation vector y of
length m. leny = (m−1)×|incy|+1.
Notes These subprograms do not use the BLAS indexing scheme described in “BLAS
Indexing Conventions” in the introduction to Chapter 2. Indexing works the
same way as the BLAS for a positive increment, but for a negative increment,
these subprograms access data backward from the beginning of the array
passed to it rather than from the end. To index backward through an array, as
desired for a convolution, the ending location of the array should be passed to
the subprogram. Refer to “Example 2” on page 602.
Example 1 Compute the discrete tapered correlation of the REAL*4 vectors x = (4, 1) and
w = (2, 1) stored in arrays X and W, respectively. In this instance, n = 2 and
m =4.
INTEGER*4 INCX,INCW,INCY,M,N
REAL*4 X(2),W(2),Y(4)
DATA X / 4.0 , 1.0 /
DATA W / 2.0 , 1.0 /
M = 4
N = 2
INCX = 1
INCW = 1
INCY = 1
CALL STCONV (X,INCX,W,INCW,Y,INCY,M,N)
The result is
Example 2 Compute the discrete tapered convolution of the REAL*4 vectors x = (1, 3) and
w = (2, 1) stored in arrays X and W, respectively.
INTEGER*4 INCX,INCW,INCY,M,N
REAL*4 X(2),W(2),Y(2)
DATA X / 1.0 , 3.0 /
DATA W / 2.0 , 1.0 /
M = 2
N = 2
INCX = 1
INCW = -1
INCY = 1
CALL STCONV (X,INCX,W(N),INCW,Y,INCY,M,N)
The result is
y
˜
9200,,,().=
y
˜
73,().=