필터 지우기
필터 지우기

Difference in Wavelet decompostion coefficients

조회 수: 1 (최근 30일)
Romendra
Romendra 2012년 9월 26일
Hi,
I have a signal of size 36X1 and I get different values of the approximate coefficients when I use the GUI in wavelet toolbox vs when I script it. For the script I have tried both the dwt and the wavedec function with wavetype as 'db4'. I have tried different levels of decomp too but the approximate coefficients at level 'x' that I export from the GUI is not the same as the one I get from the script? Any help would be appreciated.
Thanks
Romendra
I retrieved the approximate coefficients from the script using the appcoef() function

채택된 답변

Wayne King
Wayne King 2012년 9월 26일
wrcoef() gives the orthogonal projection of the signal onto the vector subspace (approximation or wavelet) at the given level.
If you want to get the approximation coefficients from the GUI then you can do:
Export to Workspace -> Export Coefficients
Assume the variable in the workspace is my_VAR_1, then
appcoeff = my_VAR_1.coefs(1:my_VAR_1.longs(1));
are the approximation coefficients at the level of the GUI decomposition.
  댓글 수: 2
Romendra
Romendra 2012년 9월 27일
Ok,
so I ran the wrcoef and it is the same as the one from the GUI for a decomp level 'x'. Is there a way that I can make the GUI spit out the coefficients after the decomp before the reconstruction.
Thanks for the help
Wayne King
Wayne King 2012년 9월 27일
Yes, Export to Workspace -> Export Coefficients. That exports the coefficients just as you get with
[C,L] = wavedec()

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Wayne King
Wayne King 2012년 9월 26일
Hi Romendra, The export approximations from the GUI is not the approximation coefficients, it is a projection onto a particular subspace. You can get this at the command line with wrcoef() with the 'a' type.
x = randn(36,1);
[C,L] = wavedec(x,2,'db4');
xapp2 = wrcoef('a',C,L,'db4',2);
  댓글 수: 1
Romendra
Romendra 2012년 9월 26일
Would you mind clearing what you mean by projection into a particular subspace? wrcoef will reconstruct the signal and given the coefficient type 'a' in this case. I was just trying to figure out if there is a way to extract an approximate coefficient for a certain level of decomp for a signal. Thanks

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Discrete Multiresolution Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by