Main Content

bohmanwin

Description

w = bohmanwin(L) returns an L-point Bohman window in w.

example

w = bohmanwin(L,typeName) specifies the option to return the window w with single or double precision.

Examples

collapse all

Compute a 64-point Bohman window. Display the result using wvtool.

L = 64;
bw = bohmanwin(L);
wvtool(bw)

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.

Input Arguments

collapse all

Window length, specified as a positive integer.

Note

If you specify L as noninteger, the function rounds it to the nearest integer value.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Since R2024b

Output data type (class), specified as one of these:

  • "double" — Use this option to return a double-precision output w.

  • "single" — Use this option to return a single-precision output w.

Data Types: char | string

Output Arguments

collapse all

Bohman window, returned as a column vector.

Algorithms

A Bohman window is the convolution of two half-duration cosine lobes. In the time domain, it is the product of a triangular window and a single cycle of a cosine with a term added to set the first derivative to zero at the boundary. Bohman windows fall off as 1/w4.The equation for computing the coefficients of a Bohman window is

w(x)=(1|x|)cos(π|x|)+1πsin(π|x|),1x1

where x is a length-L vector of linearly spaced values generated using linspace. The first and last elements of the Bohman window are forced to be identically zero.

References

[1] harris, fredric j. “On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform.” Proceedings of the IEEE®. Vol. 66, January 1978, pp. 51–83.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced before R2006a

expand all