BartlettWindow
表示 x 的一个 Bartlett 窗函数.
更多信息
- BartlettWindow 亦称为三角窗,通常用于抗混叠和重新采样.
- 窗函数被用在以较短的片段来处理数据的应用中,并且通过在每个片段的末尾将数据值逐渐减小为零来产生平滑效果.
- BartlettWindow[x] 等价于
. - BartlettWindow 自动线性作用于列表.
范例
打开所有单元 关闭所有单元基本范例 (3)
范围 (4)
BartlettWindow[0.1]Plot[BartlettWindow[(x - 1) / 2], {x, -1, 3}]Plot3D[BartlettWindow[Sqrt[x ^ 2 + y ^ 2]], {x, -1, 1}, {y, -1, 1}, PlotRange -> All]ListPlot[Array[BartlettWindow, 15, {-1 / 2, 1 / 2}], Filling -> Axis]ListPointPlot3D[Array[BartlettWindow[#1] BartlettWindow[#2]&, {15, 10}, {{-1 / 2, 1 / 2}}], Filling -> Axis]应用 (4)
h = ConstantArray[1 / 11, 11]w = Array[BartlettWindow, Length[h], {-1 / 2, 1 / 2}];
fir = w h;fir / Total[fir]Plot[Evaluate[20Log10[Abs@ListFourierSequenceTransform[#, ω]]& /@ {h, %}], {ω, 0, Pi}, GridLines -> Automatic]a = AudioGenerator["White", 1, SampleRate -> 8000];
Periodogram[{a, LowpassFilter[a, 8000 π / 3, 21, BartlettWindow]}]使用窗指定,计算样本 PowerSpectralDensity:
proc = ARMAProcess[1, {.5}, {.3}, 1];
data = RandomFunction[proc, {50}];spec = PowerSpectralDensity[data, w, BartlettWindow];sd = PowerSpectralDensity[data, w];sd === specPlot[{sd, spec}, {w, -π, π}, PlotRange -> All, PlotLegends -> {"no window", "with window"}]Plot[{spec, Evaluate@PowerSpectralDensity[proc, w]}, {w, -π, π}, PlotLegends -> {"data", "process"}]data = RandomFunction[ARMAProcess[1, {.3}, {.4}, 1], {300}];EstimatedProcess[data, ARMAProcess[1, 1], ProcessEstimator -> {"SpectralEstimator", "Window" -> BartlettWindow}]属性和关系 (6)
BartlettWindow 相当于被压缩的 UnitTriangle:
PiecewiseExpand[BartlettWindow[x]] === PiecewiseExpand[UnitTriangle[2x]]area = Integrate[BartlettWindow[x], {x, -∞, ∞}]Plot[{BartlettWindow[x], BartlettWindow[x] / area}, {x, -1, 1}]f = FourierTransform[BartlettWindow[x], x, w]LogLinearPlot[20 Log[10, Abs[f]], {w, .1, 100}]Array[BartlettWindow, 15, {-0.5, 0.5}]% / Total[%]长度为 15 的归一化离散 Bartlett 窗的离散时间傅立叶变换:
(win = Array[BartlettWindow, 15, {-0.5, 0.5}];
f = ListFourierSequenceTransform[win / Total[win], ω])Plot[Abs@f, {ω, 0, π}, PlotRange -> All]tab = Table[(h = Array[win, 15, {-0.5, 0.5}];
20Log10[Abs@ListFourierSequenceTransform[h / Total[h], ω]]), {win, {BartlettWindow, DirichletWindow}}];Plot[tab, {ω, 0, π}, PlotRange -> {5, -80}, PlotLegends -> {BartlettWindow, DirichletWindow}]相关指南
文本
Wolfram Research (2012),BartlettWindow,Wolfram 语言函数,https://reference.wolfram.com/language/ref/BartlettWindow.html.
CMS
Wolfram 语言. 2012. "BartlettWindow." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/BartlettWindow.html.
APA
Wolfram 语言. (2012). BartlettWindow. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/BartlettWindow.html 年
BibTeX
@misc{reference.wolfram_2026_bartlettwindow, author="Wolfram Research", title="{BartlettWindow}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/BartlettWindow.html}", note=[Accessed: 09-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_bartlettwindow, organization={Wolfram Research}, title={BartlettWindow}, year={2012}, url={https://reference.wolfram.com/language/ref/BartlettWindow.html}, note=[Accessed: 09-August-2026]}