Description Usage Arguments Details Value Examples
Filter a regularly sampled univariate or multivariate timeseries using cosine-squared, symmetric filter bank. Filtering is performed in the frequency domain.
1 |
s |
univariate or multivariate (as matrix columns) real-valued timeseries. |
fc |
vector of "corner" frequencies specifying endpoints of frequency bands. Regardless of sample rate, these are specified in terms of the Nyquist band (0,0.5). |
fw |
amplitudes of filter at corresponding corner frequencies. Lengths of fc and fw must match. Must be 0 (reject) or 1 (pass). |
By specifying fc and fw, one can create many filters: low-pass, high-pass, band-pass and band-reject as well as their combinations. Filter response will be 0 or 1 except across intervals where fw changes. The lengths of these transitions affect the length of the effective filter impulse response. Short transitions produce long filters. Filtering is performed in the frequency domain and is circular. Input timeseries is padded to next factor of 2 prior to filtering. If the length is near a factor of 2, you may want to pad s prior to use of cosfilt, especially if filter transition intervals are short.
filtered timeseries
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.