CXML
sconv_nonperiodic_ext, dconv_nonperiodic_ext, cconv_nonperiodic_ext,
zconv_nonperiodic_ext
Extended nonperiodic convolution
FORMAT
status = {S,D,C,Z}CONV_NONPERIODIC_EXT
(x, nx_stride, y, ny_stride, out, out_stride, nx, ny, n_out_start,
n_out_end, add_flag, scale_flag, scale, scale_stride)
Arguments
x real*4 | real*8 | complex*8 | complex*16
On entry, an array containing the data to be convolved.
On exit, x is unchanged.
nx_stride integer*4
Distance between elements in the X array; nx_stride > 0
y real*4 | real*8 | complex*8 | complex*16
On entry, an array containing the convolution or
"filter" function which is to be convolved with the
data from the X array.
On exit, y is unchanged.
ny_stride integer*4
Distance between elements in the Y array; ny_stride > 0
out real*4 | real*8 | complex*8 | complex*16
On entry, a one-dimensional array OUT of length nx + ny
- 1.
On exit, out contains the convolution coefficients.
out_stride integer*4
Specifies the distance between elements in the OUT
array; out_stride > 0
nx, ny integer*4
Specifies the number of values to be operated on; nx,
ny > 0
n_out_start, n_out_end
integer*4
Specifies the range of coefficients computed; n_out_end
> n_out_start. The OUT array has zero values for
indices less than 0 or greater than
nx + ny -2.
For example, in the case of nx = 50 and ny = 100, the
range of locations is 0 through 148. If you specify
n_out_start = 5 and n_out_end = 10, the convolution
function generates numbers for OUT(5) through OUT(10)
and puts the results in location 0 through 5 of the OUT
array.
You can also specify a range that is larger than the
array, creating null elements in the output array. For
example, using the same input array, you can specify
n_out_start = -10 and n_out_end = 200. The convolution
function can generate values for 0 through 148, putting
them in location 10 through 158 of the output array. It
puts null elements in the locations between 0 and 9 and
between 159 and 200.
add_flag logical*4
Defines the operation of the convolution to add output
to an existing OUT array, without overwriting it.
TRUE: Add the result of the operation to OUT array.
FALSE: Overwrite the existing OUT array.
scale_flag logical*4
Defines the operation of the convolution to scale the
output.
TRUE: Scale the output.
FALSE: Do not scale.
scale real*4 | real*8 | complex*8 | complex*16
The value used to scale the output. The type of value
depends on scale_stride.
scale_stride integer*4
Defines how the scale operation is performed.
scale_stride# 0:
= 0 : Scale by a scalar value
> 0: Scale by a vector, used as the stride of scale
Description
The _CONV_NONPERIODIC_EXT functions compute the nonperiodic convolution
with options to control the result.
Return Values
0 DXML_SUCCESS()
8 DXML_ILL_N_RANGE()
13 DXML_BAD_STRIDE()
Example
INCLUDE 'CXMLDEF.FOR'
INTEGER*4 N,STATUS
REAL*8 A(50),B(100),C(6),SCALE_VALUE
SCALE_VALUE = 2.0
STATUS = DCONV_NONPERIODIC_EXT(A,1,B,1,C,1,50,100,5,10,.FALSE.,.TRUE.,
* SCALE_VALUE,0)
This FORTRAN code computes six values of a nonperiodic convolution of two
vectors, C(5) to C(10), of double-precision real numbers, a and b, with
lengths of 50 and 100, respectively. The result is scaled by 2.0 and stored
in c with length of 6.
CXML Home Page Index of CXML Routines