# FlatTopWin

Advanced Analysis Library Only

AnalysisLibErrType FlatTopWin (double arrayX[], int numberOfElements);

## Purpose

Applies a flat top window to the input signal. If Y represents the output sequence, FlatTopWin obtains the elements of Y using the following formula:

Y[i] = X[i] (0.215578948 — 0.416631580cos(w) + 0.277263158cos(2w) — 0.083578947cos(3w) + 0.006947368cos(4w))

w is w = (2*PI)i/n

where n is the number of elements in arrayX

## Parameters

Input
Name | Type | Description
numberOfElements | integer | Number of elements in the input array, arrayX.
Output
Name | Type | Description
arrayX | double-precision array | On input, the input signal. On output, the signal after FlatTopWin applies the flat top window.

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