# ScaledWindow

Advanced Analysis Library Only

AnalysisLibErrType ScaledWindow (double XArray[], int numberOfElements, int windowType, WindowConst *windowConstants);

## Purpose

| Note This function is obsolete. National Instruments recommends that you use ScaledWindowEx instead.

Applies a scaled window to the time-domain signal and outputs window constants for further analysis.

The windowed time-domain signal is scaled so that when ScaledWindow calculates the power or amplitude spectrum of the windowed waveform, all windows provide the same level within the accuracy constraints of the window. ScaledWindow also returns important window constants for the window you select. These constants are useful when you use functions that perform computations on the power spectrum, such as PowerFrequencyEstimate.

ScaledWindow can perform this operation in place; that is, the input and output arrays can be the same.

## Parameters

Input
Name | Type | Description
numberOfElements | integer | Number of elements in the input array.
windowType | integer | Type of the window function to apply to the input signal. windowType has the values shown in the following table.
Value | Description
0 (Default) | Rectangular
1 | Hanning
2 | Hamming
3 | Blackman-Harris
4 | Exact Blackman
5 | Blackman
6 | Flat Top
7 | 4-Term Blackman-Harris
8 | 7-Term Blackman-Harris
9 | Low Sidelobe
Output
Name | Type | Description
XArray | double-precision array | As an input parameter, the input array that contains the time-domain signal to window. As an output parameter, the windowed version of the input array.
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. ScaledWindow uses this value to normalize peak signal gains to that 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.