CXML
scorr_nonperiodic_ext, dcorr_nonperiodic_ext, ccorr_nonperiodic_ext,
zcorr_nonperiodic_ext
Extended nonperiodic correlation
FORMAT
status = {S,D,C,Z}CORR_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
correlated.
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 function which is to
be correlated 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 correlated data.
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 1- ny or greater than nx - 1.
For example, in the case of nx = 50 and ny = 100, the
range of locations is -99 through 49. If you specify
n_out_start = 5 and n_out_end = 10, the correlation
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 = -110 and n_out_end = 60. The correlation
function can generate values for OUT(-99) through
OUT(49), putting the results in locations 11 through
159. The locations 0 through 10 and 160 through 170
have no values, because OUT(-110) through OUT(-100) and
OUT(50) through OUT(60) are out of range.
add_flag logical*4
Defines the operation of the correlation 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 correlation to scale the
output.
TRUE: Scale the output.
FALSE: Do not scale.
scale real*4 | real*8 | complex*8 | complex*16
The value by which to scale the output.
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 _CORR_NONPERIODIC_EXT functions compute the nonperiodic correlation
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 = DCORR_NONPERIODIC_EXT(A,1,B,1,C,1,50,100,-99,-94,
* .FALSE.,.TRUE.,SCALE_VALUE,0)
This FORTRAN code computes six values of a nonperiodic correlation of two
vectors, C(-99) to C(-94), 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 a length of 6.
CXML Home Page Index of CXML Routines