CrossSpectrum
Advanced Analysis Library Only
AnalysisLibErrType CrossSpectrum (double xArray[], double yArray[], ssize_t numberOfElements, double realSxy[], double imaginarySxy[]);
Purpose
Calculates the double-sided cross power spectrum, Sxy, of the input sequences X and Y according to the following formula:
where FFT*[X] is the complex conjugate of FFT[X].
The input sequences are copied to internal buffers and zero-padded to numberOfElements samples before the FFTs are computed. The output arrays are the real and imaginary parts of the cross spectrum CrossSpectrum.
Parameters
| Input | ||
| Name | Type | Description |
| xArray | double [] | Time-domain signal X. |
| yArray | double [] | Time-domain signal Y. |
| numberOfElements | ssize_t | Number of elements in the input arrays. xArray and yArray must have the same length. |
| Output | ||
| Name | Type | Description |
| realSxy | double [] | The real part of the double-sided cross power spectrum between signals X and Y. The size of this array must be at least numberOfElements. |
| imaginarySxy | double [] | Imaginary part of the double-sided cross power spectrum between signals X and Y. The size of this array must be at least numberOfElements. |
Return Value
| Name | Type | Description |
| status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |
Additional Information
Library: Advanced Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later