主要内容

barthannwin

修正巴特利-汉宁窗

说明

w = barthannwin(L) 返回一个长度为 L 个点的修正巴特利-汉宁窗。

示例

w = barthannwin(L,typeName) 指定以单精度或双精度返回窗 w 的选项。

示例

全部折叠

创建一个长度为 64 个点的巴特利-汉宁窗。使用 wvtool 显示结果。

L = 64;
wvtool(barthannwin(L))

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.

输入参数

全部折叠

窗长度,指定为正整数。

注意

如果将 L 指定为非整数,该函数会将其舍入为最接近的整数值。

数据类型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

自 R2024b 起

输出数据类型(类),指定为以下类型之一:

  • "double" - 使用此选项返回双精度输出 w

  • "single" - 使用此选项返回单精度输出 w

数据类型: char | string

输出参量

全部折叠

修正巴特利-汉宁窗,以长度为 L 的列向量形式返回。

算法

计算修正巴特利-汉宁窗系数的方程为

w(n)=0.620.48|(nN0.5)|+0.38cos(2π(nN0.5))

其中 0nN 且窗长度为 L=N+1

与巴特利窗、汉宁窗和汉明窗类似,此窗在原点有主瓣,两侧有渐近衰减的旁瓣。它是加权巴特利窗和汉宁窗的线性组合,其近旁瓣低于巴特利窗和汉宁窗,远旁瓣低于巴特利窗和汉明窗。修正巴特利-汉宁窗的主瓣宽度相对于巴特利窗或汉宁窗的主瓣宽度没有增加。

参考

[1] Ha, Y. H., and J. A. Pearce. “A New Window and Comparison to Standard Windows.” IEEE® Transactions on Acoustics, Speech, and Signal Processing. Vol. 37, Number 2, 1999, pp. 298–301.

[2] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999, p. 468.

扩展功能

全部展开

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

版本历史记录

在 R2006a 之前推出

全部展开