This function applies a bandpass filter to a signal.
It first normalizes the high and low frequencies based on the Nyquist frequency,
then creates a Butterworth filter using the `signal::butter` function,
and finally applies the filter to the signal using `signal::filtfilt`.
Usage
bandpass(x, high, low, sRate, order = 5)
Value
A numeric vector representing the filtered signal.
Arguments
x
A numeric vector representing the signal to be filtered.
high
The high cutoff frequency for the bandpass filter.
low
The low cutoff frequency for the bandpass filter.
sRate
The sampling rate of the signal.
order
The order of the Butterworth filter, defaulting to 5.