Learn R Programming

seewave (version 2.2.4)

squarefilter: Frequency square filter

Description

This function prepares the amplitude profile of a square frequency filter.

Usage

squarefilter(f, from = NULL, to = NULL, bandpass = TRUE, wl = 1024)

Arguments

Value

The function returns a two-column matrix, the first column is the frequency in kHz and the second column is the amplitude of the filter (frequency response of the filter).

See Also

fir, drawfilter, ffilter, combfilter, bwfilter

Examples

Run this code
f <- 44100
a <- noisew(f = f, d = 1)
p <- squarefilter(f, from = c(100, 1000, 4000), to = c(500, 3000, 8000))
plot(p, type="l")
h <- fir(a, f = f, custom = p, wl = 1024, output = 'Wave')
spectro(h)

Run the code above in your browser using DataLab