wavGain {wmtsa} | R Documentation |
Given g and h are the impulse responses for the scaling and wavelet filters, respectively, and G(1,1f) and H(1,f) are their corresponding gain functions, then the gain functions for decomposition level j > 1 are calculated using the recursive algorithm:
H(j,f)=H(1, 2^(j-1)*f) * G(j-1, f), G(j,f)=G(1, 2^(j-1)*f) * G(j-1,f).
wavGain(wavelet="s8", n.levels=5, n.fft=1024, normalize=TRUE)
n.fft |
the number of Fourier coefficients to use in approximating the
gain functions. Default: 1024 . |
n.levels |
the number of decomposition levels. Default: 5 . |
normalize |
a boolean value. If TRUE ,
the filters are normalized by dividing each filter
coefficient by the sqrt(2)
(used for maximal overlap wavelet transforms).
If FALSE , no normalization is used.
Default: TRUE . |
wavelet |
a character string denoting the filter type.
See wavDaubechies for details. Default: "s8" . |
an object of class wavGain
.
D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.
I. Daubechies, Orthonormal Bases of Compactly Supported Wavelets, Communications on Pure and, Applied Mathematics, 41, 909–96.
## approximate the gain functions for the ## normalized Daubechies least asymmetric ## 20-tap filters for levels 1,...,5 using a ## 1024 Fourier frequencies result <- wavGain(wavelet="s20", n.levels=5, norm=TRUE) ## plot the results plot(result)