cwt_iw | R Documentation |
This function performs
the inverse wavelet transform of signal Wx
.
This code is translated from MATLAB Synchrosqueezing Toolbox, version 1.1 developed by Eugene Brevdo (http://www.math.princeton.edu/~ebrevdo/).
cwt_iw(Wx, type, opt=NULL)
Wx |
wavelet transform of a signal, see |
type |
wavelet used to take the wavelet transform,
see |
opt |
options list used for forward wavelet transform. |
This function performs
the inverse wavelet transform of signal Wx
, and
implements Eq. (4.67) of [1].
x |
the signal, as reconstructed from |
[1] Mallat, S (2009) A Wavelet Tour of Signal Processing, New York: Academic Press.
cwt_fw
, wfiltfn
, est_riskshrink_thresh
.
tt <- seq(0, 10, , 1024) nv <- 32 f0 <- (1+0.6*cos(2*tt))*cos(4*pi*tt+1.2*tt^2) sigma <- 0.5 f <- f0 + sigma*rnorm(length(tt)) # Continuous wavelet transform opt <- list(type = "bump") cwtfit <- cwt_fw(f, opt$type, nv, tt[2]-tt[1], opt) # Hard thresholing thresh <- est_riskshrink_thresh(cwtfit$Wx, nv) cwtfit$Wx[which(abs(cwtfit$Wx) < thresh)] <- 0.0 # Reconstruction opt$gamma <- thresh cwtrec <- cwt_iw(cwtfit$Wx, opt$type, opt) par(mfrow=c(1,1)) plot(tt, f, type="p", lty=2, xlab="time", ylab="f", col="red", cex=0.1) lines(tt, f0, col="blue") lines(tt, cwtrec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.