# ScaledWindowEx

Advanced Analysis Library Only

AnalysisLibErrType ScaledWindowEx (double xArray[], int numberOfElements, int windowType, double windowParameter, WindowConst *windowConstants);

## Purpose

Applies a scaled window to a real signal. National Instruments recommends that you use ScaledWindowEx instead of ScaledWindow. ScaledWindowEx supports more window types than ScaledWindow.

## Parameters

Input
Name | Type | Description
numberOfElements | integer | The number of elements in xArray.
windowType | integer | The type of window to apply. windowType must be one of the following values: RECTANGLE (0) HANNING (1) HAMMING (2) BLKHARRIS (3) EXBLKMAN (4) BLKMAN (5) FLATTOP (6) BH4TERM (7) BH7TERM (8) LOWSIDELB (9) BLKMANNUTTALL (11) TRIANGLE (30) KAISER (60) DOLCHEBYSHEV (61) GAUSSIAN (62)
windowParameter | double-precision | The window parameter. This parameter is referenced only if windowType is one of the following values: KAISER: windowParameter is beta. GAUSSIAN: windowParameter is the standard deviation. If windowParameter < 0, the function uses 0.2 for windowParameter instead. DOLCHEBYSHEV: windowParameter is the ratio of the mainlobe to the sidelobe, in dB. If windowParameter < 0, the function uses 60dB for windowParameter instead.
Output
Name | Type | Description
xArray | double-precision array | On entry, the input signal. On exit, the output signal with the selected window applied.
windowConstants | WindowConst | Pointer to a structure that contains the following useful constants for the selected window: enbw is the equivalent noise bandwidth of the selected window. You can use this value to calculate the power in a given frequency span. coherentgain is the peak gain of the window, relative to the peak gain of the Rectangular window. ScaledWindowEx uses this value to normalize peak gains to those of the Rectangular window. WindowConst is defined by the following C typedef statement:
                        typedef struct {
                        double enbw;
                        double coherentgain;
                        } WindowConst;

## 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.