CXML

scorr_periodic_ext, dcorr_periodic_ext, ccorr_periodic_ext, zcorr_periodic_ext 


FORMAT

  status = {S,D,C,Z}CORR_PERIODIC_EXT (x, nx_stride, y, ny_stride, out,
  out_stride, n, 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 n.
                      On exit, out contains the correlated data.

  out_stride          integer*4
                      Specifies the distance between elements in the OUT
                      array; out_stride > 0

  n                   integer*4
                      Specifies the number of values to be operated on; n > 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 n - 1.

                      For example, in the case of n = 100, the locations
                      range from 0 through 99. 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. 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 OUT(0) through
                      OUT(99),  putting them in location 10 through 109 of
                      the output array. The locations outside of the range do
                      not get null values; they are not affected.

  add_flag            logical*4
                      Defines the operation of the function to add the 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 function to multiply the
                      output by a factor.

     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_PERIODIC_EXT functions compute the periodic 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(100),B(100),C(6),SCALE_VALUE
    SCALE_VALUE = 2.0
    STATUS = DCORR_PERIODIC_EXT(A,1,B,1,C,1,100,5,10,.FALSE.,.TRUE.,SCALE_VALUE,0)

  This FORTRAN code computes six values of a periodic convolution of two
  vectors, C(5) to C(10), of double-precision real numbers, a and b, with
  length of 100. The result is scaled by  2.0 and stored in c with a length
  of 6.

CXML Home Page

Index of CXML Routines