naginterfaces.library.sum.convcorr_​complex

naginterfaces.library.sum.convcorr_complex(job, x, y)[source]

convcorr_complex calculates the circular convolution or correlation of two complex vectors of period .

For full information please refer to the NAG Library document for c06pk

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/c06/c06pkf.html

Parameters
jobint

The computation to be performed:

(convolution);

(correlation).

xcomplex, array-like, shape

The elements of one period of the vector . If is declared with bounds in the function from which convcorr_complex is called, must contain , for .

ycomplex, array-like, shape

The elements of one period of the vector . If is declared with bounds in the function from which convcorr_complex is called, must contain , for .

Returns
xcomplex, ndarray, shape

The corresponding elements of the discrete convolution or correlation.

ycomplex, ndarray, shape

The discrete Fourier transform of the convolution or correlation returned in the array .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, argument had an illegal value.

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

convcorr_complex computes:

if , the discrete convolution of and , defined by

if , the discrete correlation of and defined by

Here and are complex vectors, assumed to be periodic, with period , i.e., ; and are then also periodic with period .

Note: this usage of the terms ‘convolution’ and ‘correlation’ is taken from Brigham (1974). The term ‘convolution’ is sometimes used to denote both these computations.

If , , and are the discrete Fourier transforms of these sequences, and is the inverse discrete Fourier transform of the sequence , i.e.,

and

then and (the bar denoting complex conjugate).

References

Brigham, E O, 1974, The Fast Fourier Transform, Prentice–Hall