Description Usage Arguments Value Examples
Compute coefficients of a Lanczos filter
1 2 |
n |
length of filter; must be odd |
type |
one of "lp" (low pass), "hp" (high pass), "bp" (band pass) or "br" (band reject) |
low |
low frequency transition of "lp", "bp" and "br" filters (Nyquist = 0.5) |
high |
high frequency transition of "hp", "bp" and "br" filters (Nyquist = 0.5) |
non-negative time filter coefficients (filter is symmetric about 0).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # low-pass filter
lp <- lanczos( 7, "lp", low = 0.1 )
# high-pass filter
hp <- lanczos( 7, "hp", high = 0.4 )
# band-pass filter
bp <- lanczos( 7, "bp", low = 0.1, high = 0.4 )
# band-reject filter
br <- lanczos( 7, "br", low = 0.1, high = 0.4 )
plot( lp, xlab = "Index", ylab = "Filter Coefficients", type = "l", ylim = 1.5 * range( lp, hp, bp, br ) )
lines( hp, col = "red" )
lines( bp, col = "blue" )
lines( br, col = "green" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.