This function prepares the amplitude profile of a square frequency filter.
Usage
squarefilter(f, from = NULL, to = NULL, bandpass = TRUE, wl = 1024)
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).
Arguments
f
a numeric vector of length 1 for the sampling frequency of the object to be filtered (in Hz).
from
a numeric vector for the start frequencies (in Hz) where to apply the filter.
to
a numeric vector of the end frequencies (in Hz) where to apply the filter.
bandpass
if TRUE a band-pass filter is prepared between
start and end frequencies (arguments from and to), if FALSE a bandstop filter is prepared.
wl
window length of the impulse filter (even number of points).