Learn R Programming

mwaved (version 1.1.8)

multiProj: Meyer wavelet projection given a set of wavelet coefficients

Description

Reconstructs a function using wavelet coefficients (waveletCoef object) as input.

Usage

multiProj(beta, j1 = log2(length(beta$coef)) - 1)

Arguments

beta

A waveletCoef object that contains a vector of wavelet coefficients and the coarsest resolution level, j0 to create the required output function expansion.

j1

The finest resolution to be used in the projection (specifies which resolution that the wavelet expansion is truncated).

Value

A numeric vector of size n giving the wavelet function expansion.

Details

Function that takes an input of wavelet coefficients in the form of a waveletCoef object (see multiCoef for details) and optionally a desired maximum resolution level, j1, to create an inhomogeneous wavelet expansion starting from resolution j0 up to resolution j1. Namely, it creates the wavelet expansion, $$\sum_{k = 0}^{2^{j_0} - 1} \beta_k \phi_{j_0,k} + \sum_{j = j_0}^{j_1} \sum_{k = 0}^{2^j - 1} \beta_{j,k} \psi_{j,k}.$$ where \((\phi,\psi)\) denote the father and mother periodised Meyer wavelet functions and \(\beta_{j,k}\) denotes the mother wavelet coefficient at resolution j and location k and \(\beta_{k}\) denotes the father wavelet coefficients at resolution \(j=j0\) and location \(k\). The coefficients beta need to be ordered so that the first \(2^\code{j0}\) elements correspond to father wavelet coefficients at resolution \(j=\code{j0}\) and the remaining elements correspond to the mother wavelet coefficients from resolution \(j=\code{j0}\) to \(j = log_2 n - 1\). If the maximum resolution level j1 is not specified, the full wavelet expansion will be given.

See Also

multiCoef

Examples

Run this code
# NOT RUN {
library(mwaved)
# Make a noiseless doppler function
n <- 2^8
x <- (1:n)/n
y <- makeDoppler(n)
# Determine the wavelet coefficients
beta <- multiCoef(y)
# plot three raw wavelet expansions truncating in each case at j1 = 3, 4 and 5 respectively
plot(x, y, type = 'l', main = 'Doppler and wavelet projections at three different truncations')
j0 <- 3
j1 <- 5
j <- j0:j1
lcols <- c(1, j - j0 + 2)
ltys <-  c(1, 1:length(j))
matlines(x, sapply(j, function(i) multiProj(beta, j1 = i)), type = 'l', col = lcols[-1])
legend("bottomright", legend = c("Signal", paste('j1 =', j)), col = lcols, lty =ltys)
# }

Run the code above in your browser using DataLab