CosTaperedWinEx
- Updated2023-02-21
- 2 minute(s) read
Advanced Analysis Library Only
AnalysisLibErrType CosTaperedWinEx (double arrayX[], ssize_t numberOfElements, double ratio);
Purpose
Applies a cosine tapered window to a real signal. If y represents the output sequence arrayX, CosTaperedWinEx obtains the elements of y using the following equation:
where n is the number of elements in arrayX, , and r is the ratio of the total length of the tapered section to the whole signal length as shown in the following figure:
\n\n
If r ≤ 0, the window is equivalent to a rectangular window. If r ≥ 1, the window is equivalent to a Hanning window.
This function performs the window operation in place; that is, the windowed data replaces the input data.
National Instruments recommends you use this function instead of CosTaperedWin. CosTaperedWin uses a fixed ratio of the total length of the tapered section to the whole signal length of 0.2, whereas CosTaperedWinEx includes an additional ratio parameter, which you can use to specify the ratio.Parameters
Input | ||
Name | Type | Description |
numberOfElements | ssize_t | The number of elements in arrayX. |
ratio | double | The ratio of the total length of the tapered section to the whole signal length. The window is a cosine tapered window only if 0 < ratio < 1. If ratio <=0, the window is equivalent to a rectangular window. If ratio >=1, the window is equivalent to a Hanning window. |
Output | ||
Name | Type | Description |
arrayX | double [] | On input, the input signal. On output, this parameter returns the input signal with a cosine tapered window applied. |
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 8.0 and later