block.dct(x, n.levels=6, dct.type=2) block.cpt(x, n.levels=6, taper="poly2", dct.type=2, boundary="periodic", n.taper=NULL) as.block.cpt(x)
x
should be divisible by
2^n.levels
.
For
as.block.cpt
only,
x
should be
of class
ptable
(cosine packet table).
x
is divided into
2^n.levels
blocks each of length
n/2^n.levels
where
n=length(x)
.
If
n.levels
is bigger than
ml
, where
ml
is the maximum possible level,
computed from the
max.level
function, then
n.levels
is set to
ml
and
a warning message is given.
2
or
4
indicating which of DCT-II or DCT-IV should be used.
See the function
dct
for details.
"boxcar", "poly1", "poly2", "poly3", "poly4", "poly5"
, or
"trig"
.
See the function
cp.table
for details.
block.cpt
only,
one of the character strings:
"cp.reflect", "periodic", or "zero"
,
indicating the boundary extension rule.
See the function
cp.table
for details.
2*n.taper
.
By default,
n.taper
is set to
length(x)/2^(n.level+1)
,
which is the maximum possible length at the finest blocking level.
block.dct
returns a block DCT transform object
which has class
block.dct
, inheriting from the classes
block.cpt
,
cpt
,
cp
, and
crystal.vector
.
block.cpt
returns a block cosine packet transform object
which has class
block.cpt
, inheriting from the classes
cpt
,
cp
, and
crystal.vector
.
as.block.cpt
returns an object of
block.cpt
(if
x
is an object of class
ptable
).
See
crystal.vector.object
for details about the data structure.
x
is divided into
2^n.level
blocks,
the blocks are tapered according to
taper
,
and the DCT is applied to the tapered block.
All the default optional arguments can be reset using function
wavelet.options
, see
wavelet.options
for details.
Wickerhauser, M. V. (1994). Adapted Wavelet Analysis from Theory to Software. A. K. Peters Ltd, Wellesley, MA.
x <- make.signal("linchirp") blx <- block.dct(x, n.levels=3) eda.plot(blx)