Learn R Programming

wmtsa (version 2.0-3)

wavPacketIndices: Wavelet packet node indices

Description

Converts flattened wavelet packet node indices to corresponding level and oscillation indices.

Usage

wavPacketIndices(x, check.basis=TRUE)

Arguments

x

a vector of flattened wavelet packet node indices.

check.basis

a logical value. If TRUE, the set of specified indices is checked to ensure that the corresponding wavelet packet nodes form a legitimate basis by ensuring that (i) the union of all frequency ranges corresponding to the packet crystals span the normalized frequencies [0,1/2] and (ii) the normalized frequency ranges for all nodes do not overlap. Default: TRUE.

Value

a list of flat, level, and osc vectors containing the flattened, decomposition level, and oscillation indices, respectively, corresponding to the input.

Details

In general, wavelet packet crystals can be arranged in the so-called natural order ala \(W_{0,0} , W_{1,0}, W_{1,1}, W_{2,0}, W_{2,1}, W_{2,2}, W_{2,3}, \ldots , W_{J,0}, \ldots, W_{J, N_J}\) where \(J\) is the number of decomposition levels and \(N_J=2^J-1\). By definition, \(W_{0,0}\) is the original time series. A given crystal is identified in the \(W_{j,n}\) form above or by a flattened index. For example, the DWPT crystal in level 2 at oscillation index 1 is identified either by j,n=2,1 or by its flattened index 4 (with zero based indexing, 4 represents the fifth crystal of the wavelet packet transform in natural order). This function converts such flattened wavelet packet indices to the \(W_{j,n}\) form.

See Also

wavDWPT.

Examples

Run this code
# NOT RUN {
## specify a basis formed by the flattened indices 
## corresponding to the wavelet packet nodes 
## W(2,0:1) and W(3,4:7), but submit them in 
## arbitrary order 
wavPacketIndices(c(14,11,12,13,4,3), check.basis=TRUE)
# }

Run the code above in your browser using DataLab