How to extract the dyadic wavelet coefficeints from the DWT (decimated) 'wavedec' function output
조회 수: 4 (최근 30일)
이전 댓글 표시
The coefficients output from the function 'wavedec' are the artifacts from the convolution of the input signal (vector) and the wavelet/scale functions. Thus the length of the coefficients from any scale is a function of the lengths of the wavelet/scale functions and the dyadic of the signal at the level being decomposed. As an example if the input signal is 64 samples long and a Daubechies wavelet with four vanishing moments is used (db4) then the lengths of the coefficients produced are 7,7,8,10,14,21, and 35 for ca1, cd1, cd2, ….. cd6. The actual lengths should be 1,1,2,4,8,16, and 32. This can be verified by performing the decomposition manually without convolution, ie using the’ sumproduct’ function with the proper wavelet/scale function in Excel for instance. How then do you select the dyadic coefficients from the output from ‘wavedec”? Sometimes is looks like taking the middle n coefficients for high numbered levels works and sometimes it looks like taking the last n coefficients works for low numbered levels. What’s up?s
added note: The dwtmode was 'sym' for the above discussion. When dwtmode = 'per' the dyadic coefficients result. Modify the question to mean for modes other than 'per'
댓글 수: 0
답변 (1개)
Wayne King
2012년 10월 2일
편집: Wayne King
2012년 10월 2일
You can set the dwtmode to 'per' and then use detcoef() or appcoef()
dwtmode('per')
x = randn(1024,1);
[C,L] = wavedec(x,4,'db4');
d1 = detcoef(C,L,1);
To get all the detail coefficients in a cell array
det = detcoef(C,L,'cells');
Or you can do something like:
[d1,d2,d3,d4] = detcoef(C,L,[1 2 3 4]);
참고 항목
카테고리
Help Center 및 File Exchange에서 Blackman에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!