Engee documentation

bartlett

Bartlett’s window.

Library

EngeeDSP

Syntax

Function call

  • w = bartlett(L) — returns L-point symmetric Bartlett window.

  • w = bartlett(L,typeName) — indicates the possibility of returning the window w with single or double precision.

Arguments

Input arguments

# L — window length

+ positive integer

Details

The window length specified as a positive integer.

If you set L as a non-integer, the function will round it to the nearest integer value.
Типы данных

Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

# typeName — type of output data

+ Float64 (by default) | Float32

Details

The type of output data (class) specified in one of the following ways:

  • Float64 — use this value to return the output w with double precision.

  • Float32 — use this value to return the output w with single precision.

Типы данных

DataType

Output arguments

# w — Bartlett’s window

+ column vector

Details

Bartlett’s window, returned as a column vector.

Algorithms

The following equation calculates the Bartlett window coefficients:

The length of the window is .

Bartlett’s window is very similar to a triangular window. However, the Bartlett window always contains zeros in the first and last samples, while the triangular window at these points is non-zero.

If you set a single-point window (L = 1), the function will return the value 1.

Literature

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