Decimate
Advanced Analysis Library Only
AnalysisLibErrType Decimate (double inputArray[], ssize_t numberOfElements, ssize_t decimatingFactor, int averaging, double decimatedArray[]);
Purpose
Decimates the input sequence X by the decimating factor and the averaging you specify. If Y represents the decimated output sequence, Decimate obtains the elements of the sequence Y using the following formula:
| where | i = 0, 1, 2, . . ., size – 1 |
| size = trunc(numberOfElements/dFactor) is the size of the output sequence |
Parameters
| Input | ||
| Name | Type | Description |
| inputArray | double [] | The input array to decimate. If decimatedArray is NULL, inputArray is overwritten by the output sequence. |
| numberOfElements | ssize_t | Number of elements in the input array. |
| decimatingFactor | ssize_t | Amount by which to decimate inputArray to form decimatedArray. dFactor must be greater than 0 and less than numberOfElements. |
| averaging | int | Specify a nonzero value or ENABLE_OPTION or select On in the function panel to use averaging in decimating the inputArray. Specify 0 or DISABLE_OPTION or select Off in the function panel to disable averaging. This is the default value. |
| Output | ||
| Name | Type | Description |
| decimatedArray | double [] | The output array, which is inputArray decimated by the dFactor. The size of this array must be trunc(numberOfElements/dFactor). |
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