blackmanharris: Blackman-Harris window

View source: R/blackmanharris.R

blackmanharrisR Documentation

Blackman-Harris window

Description

Return the filter coefficients of a minimum four-term Blackman-Harris window.

Usage

blackmanharris(n, method = c("symmetric", "periodic"))

Arguments

n

Window length, specified as a positive integer.

method

Character string. Window sampling method, specified as:

"symmetric" (Default)

Use this option when using windows for filter design.

"periodic"

This option is useful for spectral analysis because it enables a windowed signal to have the perfect periodic extension implicit in the discrete Fourier transform. When "periodic" is specified, the function computes a window of length n + 1 and returns the first n points.

Details

The Blackman window is a member of the family of cosine sum windows. It is a generalization of the Hamming family, produced by adding more shifted sinc functions, meant to minimize side-lobe levels.

Value

Blackman-Harris window, returned as a vector.

Author(s)

Sylvain Pelissier, sylvain.pelissier@gmail.com.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.

Examples


b <- blackmanharris(64)
plot (b, type = "l", xlab = "Samples", ylab =" Amplitude")

bs = blackmanharris(64,'symmetric')
bp = blackmanharris(63,'periodic')
plot (bs, type = "l", xlab = "Samples", ylab =" Amplitude")
lines(bp, col="red")


gsignal documentation built on Sept. 12, 2024, 6:27 a.m.