boxcar: Rectangular window

View source: R/boxcar.R

boxcarR Documentation

Rectangular window

Description

Return the filter coefficients of a boxcar (rectangular) window.

Usage

boxcar(n)

Arguments

n

Window length, specified as a positive integer.

Details

The rectangular window (sometimes known as the boxcar or Dirichlet window) is the simplest window, equivalent to replacing all but n values of a data sequence by zeros, making it appear as though the waveform suddenly turns on and off. Other windows are designed to moderate these sudden changes, which reduces scalloping loss and improves dynamic range.

Value

rectangular window, returned as a vector.

Author(s)

Paul Kienzle, pkienzle@users.sf.net.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.

See Also

triang

Examples


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


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