rectwin: Rectangular window

View source: R/rectwin.R

rectwinR Documentation

Rectangular window

Description

Return the filter coefficients of a rectangular window of length n.

Usage

rectwin(n)

Arguments

n

Window length, specified as a positive integer.

Details

The output of the rectwin function with input n can also be created using the rep function: w <- rep(1L, n)

Value

rectangular 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.

See Also

boxcar

Examples


r <- rectwin(64)
plot (r, type = "l", xlab = "Samples", ylab =" Amplitude", ylim = c(0, 1))


gjmvanboxtel/gsignal documentation built on Nov. 22, 2023, 8:19 p.m.