Main Content

rectwin

矩形窗

说明

示例

w = rectwin(L) 返回一个长度为 L 的矩形窗。

示例

全部折叠

创建一个长度为 64 个点的矩形窗。使用 wvtool 显示结果。

L = 64;
wvtool(rectwin(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.

输入参数

全部折叠

窗长度,指定为正整数。

数据类型: single | double

输出参数

全部折叠

矩形窗,以列向量形式返回。

算法

对于输入为 Lrectwin 函数,其输出也可以使用 ones 函数创建。

w = ones(L,1);

参考

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

扩展功能

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

版本历史记录

在 R2006a 之前推出