Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

flattopwin

平顶加权窗

说明

示例

w = flattopwin(L) 返回一个长度为 L 个点的对称平顶窗

w = flattopwin(L,sflag) 使用 sflag 指定的窗采样方法返回一个长度为 L 个点的对称平顶窗。

示例

全部折叠

创建一个长度为 64 个点的对称平顶窗。使用 wvtool 查看结果。

N = 64;
w = flattopwin(N);
wvtool(w)

Figure Window Visualization Tool contains 2 axes objects and other objects of type uimenu, uitoolbar, uipanel. Axes object 1 with title Time domain, xlabel Samples, ylabel Amplitude contains an object of type line. Axes object 2 with title Frequency domain, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains an object of type line.

输入参数

全部折叠

窗长度,指定为正整数。

数据类型: single | double

窗采样方法,指定为:

  • 'symmetric' - 在使用窗进行滤波器设计时使用此选项。

  • 'periodic' - 此选项对于频谱分析很有用,因为它使加窗信号可具有离散傅里叶变换中固有的完美周期延拓。当指定 'periodic' 时,该函数计算长度为 L + 1 的窗,并返回前 L 个点。

输出参数

全部折叠

平顶窗,以列向量形式返回。

算法

平顶窗是对余弦的求和。平顶窗的系数通过以下方程计算:

w(n)=a0a1cos(2πnL1)+a2cos(4πnL1)a3cos(6πnL1)+a4cos(8πnL1),

其中 0nL1。系数值为:

系数
a00.21557895
a10.41663158
a20.277263158
a30.083578947
a40.006947368

平顶窗具有极低的通带波纹 (< 0.01 dB),主要用于标定目的。其带宽大约是汉宁窗的 2.5 倍。

参考

[1] D’Antona, Gabriele, and A. Ferrero. Digital Signal Processing for Measurement Systems. New York: Springer Media, 2006, pp. 70–72.

[2] Gade, Svend, and Henrik Herlufsen. “Use of Weighting Functions in DFT/FFT Analysis (Part I).” Windows to FFT Analysis (Part I): Brüel & Kjær Technical Review. Vol. x, Number 3, 1987, pp. 1–28.

扩展功能

C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。

版本历史记录

在 R2006a 之前推出

另请参阅

App

函数