draw.default(filter.number=2, family="DaubExPhase",
resolution=1024, verbose=FALSE, plot=TRUE, main="Wavelet Picture",
sub=zwd$filter$name, xlab="x", ylab=expression(psi(x)), dimension=1,
twodplot=persp, enhance=TRUE, efactor=0.05, ...)
TRUE
, report the progress of drawing.persp
that can do
something interesting with a matrix!enhance=TRUE
then the function tries to draw
the wavelet on its effective support.plot
or twodplot
.plot
is false then no actual drawing is done, however, a list is
returned. If dim=1
the list has two components x and y, representing the
domain of definition (or effective support) of the wavelet and the
value of the wavelet at x. If dim=2
, the list has three components
x,y and z.A method similar to the one we present here is presented in Daubechies (1992) in Section~6.5 on the cascade algorithm.
The principle is simple, but the implementation to get good pictures is surprisingly tricky. Ideally you want to put in the non-zero coefficient at the lowest resolution level as possible, this will give you as much detail as possible. However, the support of some of the large-scale wavelets is greater than the union of the supports of all the high-resolution small-scale wavelets and so it may not be possible to draw a complete wavelet.
This function analyses the supports of the wavelets at different levels and finds a coefficient to set to one by choosing the wavelet at the lowest possible resolution and whose support is within the union of supports of the highest resolution wavelets. If there is a choice of such wavelets, then the middle-most one is selected.
draw
, draw.wd
etc.par(mfrow=c(3,2))
for(fn in 1:6) {
draw.default(filter.number= fn, col = "blue")
abline(h=0,v=0, lty=3, lwd=.5, col = "gray")
}
par(mfrow=c(1,1))
# Draw a 2-dimensional Daubechies least asymmetric wavelet
draw.default(filter.number=6, family="DaubLeAsymm", dim=2, resolution=128)
Run the code above in your browser using DataLab