mfirst.last | R Documentation |
This function is not intended for user use, but is used by various functions involved in computing and displaying multiple wavelet transforms.
mfirst.last(LengthH, nlevels, ndecim, type = "wavelet", bc = "periodic")
LengthH |
Number of filter matrix coefficients. |
nlevels |
Number of levels in the decomposition |
ndecim |
The decimation scale factor for the multiple wavelet basis. |
type |
Whether the transform is non-decimated or ordinary (wavelet). The non-decimated multiple wavelet transform is not yet supported. |
bc |
This argument determines how the boundaries of the the function are to be handled. The permitted values are periodic or |
Suppose you begin with 2^m
=2048 coefficient vectors. At the next level you would expect 1024 smoothed data vectors, and 1024 wavelet vectors, and if bc="periodic"
this is indeed what happens. However, if bc="symmetric"
you actually need more than 1024 (as the wavelets extend over the edges). The first last database keeps track of where all these "extras" appear and also where they are located in the packed vectors C and D of pyramidal coefficients within wavelet structures.
For examples, given a first.last.c
row of
-2 3 20
The ‘position’ of the coefficient vectors would be
c_{-2}, c_{-1}, c_{0}, c_{1}, c_{2}, c_{3}
In other words, there are 6 coefficients, starting at -2 and ending at 3, and the first of these (c_{-2}
) appears at column 20 of the $C
component matrix of the wavelet structure.
You can “do” first.last in your head for periodic boundary handling but for more general boundary treatments (e.g. symmetric) first.last is indispensable.
The numbers in first last databases were worked out from inequalities derived from: Daubechies, I. (1988).
A first/last database structure, a list containing the following information:
first.last.c |
A |
nvecs.c |
The number of C coefficient vectors. |
first.last.d |
A |
nvecs.d |
The number of |
Version 3.9.6 (Although Copyright Tim Downie 1995-6)
Tim Downie
accessC.mwd
, accessD.mwd
, draw.mwd
, mwd.object
, mwd
, mwr
, plot.mwd
, print.mwd
, putC.mwd
, putD.mwd
, summary.mwd
, threshold.mwd
, wd
, wr.mwd
.
#
#To see the housekeeping variables for a decomposition with
# 4 filter coefficient matices
# 5 resolution levels and a decimation scale of two
# use:
mfirst.last(4,5,2)
# $first.last.c:
# First Last Offset
# [1,] 0 0 62
# [2,] 0 1 60
# [3,] 0 3 56
# [4,] 0 7 48
# [5,] 0 15 32
# [6,] 0 31 0
#
# $nvecs.c:
# [1] 63
#
# $first.last.d:
# First Last Offset
# [1,] 0 0 30
# [2,] 0 1 28
# [3,] 0 3 24
# [4,] 0 7 16
# [5,] 0 15 0
#
# $nvecs.d:
# [1] 31
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.