CxSpectrum
- Updated2023-02-21
- 1 minute(s) read
Advanced Analysis Library Only
AnalysisLibErrType CxSpectrum (NIComplexNumber array[], ssize_t numberOfElements, double spectrum[]);
Purpose
Calculates the power spectrum of the complex input array. CxSpectrum uses the following formula to obtain the power spectrum ps:

CxSpectrum performs the operation in place and overwrites the input array.
Example Code
/* Generate an array with random numbers and calculate its power spectrum. */
Parameters
Input | ||
Name | Type | Description |
array | NIComplexNumber [] | The array used to compute the power spectrum. |
numberOfElements | ssize_t | Number of elements in the input array. |
Output | ||
Name | Type | Description |
spectrum | double [] | The power spectrum. |
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 2012 and later