Group: | Mathematical Functions |
Topic: | Fourier and Wavelet transforms |
See also: | invdwt fwt invfwt fwtin fwtinshift fwt2 |
Function: | dwt | |
Description: | dwt computes the Discrete Wavelet Transformation of a vector. |
Usage: | y = dwt (x, l, h) | |
Input: | ||
x | n x 1 vector, input data where n has to be a power of 2 | |
l | integer, number of father wavelet coefficients, l has to be a power of 2 | |
h | m x 1 vector, wavelet basis | |
Output: | ||
y | n x 1 vector, wavelet coefficients |
To get vectors of the wavelet basis, the library wavelet has to be loaded: h can be either daubechies2,4,6,8,10,12,14,16,18,20, symmlet4 to 10 or coiflet1 to 5.
library("wavelet") x =(0:1023)/1023 d = dwt(x, 4, daubechies4) d
Contents of d [ 1,] 2.5285 [ 2,] 6.5324 [ 3,] 10.795 [ 4,] 12.144 [ 5,] -3.6494 [ 6,] -7.0777e-16 ... [1019,] -8.3267e-17 [1020,] -1.6653e-16 [1021,] -1.3878e-16 [1022,] -1.3878e-16 [1023,] -1.1102e-16 [1024,] -8.3267e-17