Learn R Programming

gsignal (version 0.3-1)

rectwin: 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.

Value

rectangular window, returned as a vector.

Details

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

See Also

boxcar

Examples

Run this code
# NOT RUN {
r <- rectwin(64)
plot (r, type = "l", xlab = "Samples", ylab =" Amplitude", ylim = c(0, 1))

# }

Run the code above in your browser using DataLab