Local Cosine Transform

DESCRIPTION:

Computes local cosine transform.

USAGE:

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) 

REQUIRED ARGUMENTS:

x
a vector or univariate time series. Should demean first. The length of x should be divisible by 2^n.levels. For as.block.cpt only, x should be of class ptable (cosine packet table).

OPTIONAL ARGUMENTS:

n.levels
a non-negative integer specifying the blocking factor: 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.
dct.type
one of 2 or 4 indicating which of DCT-II or DCT-IV should be used. See the function dct for details.
taper
a character string, indicating the taper function: "boxcar", "poly1", "poly2", "poly3", "poly4", "poly5", or "trig". See the function cp.table for details.
boundary
for 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.
n.taper
a non-negative integer. The length of the taper will be 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.

VALUE:

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.

DETAILS:

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.

REFERENCES:

Wickerhauser, M. V. (1994). Adapted Wavelet Analysis from Theory to Software. A. K. Peters Ltd, Wellesley, MA.

SEE ALSO:

, , , , .

EXAMPLES:

x <- make.signal("linchirp") 
blx <- block.dct(x, n.levels=3) 
eda.plot(blx)