how dwt and wavedec are different ? here why cA1 and C have diffrent values?
조회 수: 3 (최근 30일)
이전 댓글 표시
data=xlsread('E:\color\neha.xlsx');
data= data';
value1=data(1,:);
chan1= value1-mean(value1);
[cA1,cD1] = dwt(chan1,'db4');
[cA2,cD2] = dwt(cA1,'db4');
[cA3,cD3] = dwt(cA2,'db4');
[cA4,cD4] = dwt(cA3,'db4');
[cA5,cD5] = dwt(cA4,'db4');
[cA6,cD6] = dwt(cA5,'db4');
[cA7,cD7] = dwt(cA6,'db4');
[cA8,cD8] = dwt(cA7,'db4');
[cA9,cD9] = dwt(cA8,'db4');
[cA10,cD10] = dwt(cA9,'db4');
[C,L] = wavedec(chan1,10,'db4');
댓글 수: 1
Raul Souza Muniz
2021년 7월 5일
Can I ask you something ? Do I have to do this manually. I mean, could I make an matrix and put all the c values and D values in the matrix with a for loop ? I cannot see a way to do this, because there is a long time since I programed in matlab. Really sorry for my dumb question.
Thank you very much
채택된 답변
Wayne King
2013년 3월 9일
편집: Wayne King
2013년 3월 9일
As you see, dwt() gives only a level 1 DWT, while wavedec gives you multiple levels. But you are correct that wavedec() simply iterates on the approximation coefficients of the previous level as expected.
Why do you say they are different? I do not see it. The first L(1) elements of wavedec should equal cA10 above
chan1 = randn(1024,1);
[cA1,cD1] = dwt(chan1,'db4');
[cA2,cD2] = dwt(cA1,'db4');
[cA3,cD3] = dwt(cA2,'db4');
[cA4,cD4] = dwt(cA3,'db4');
[cA5,cD5] = dwt(cA4,'db4');
[cA6,cD6] = dwt(cA5,'db4');
[cA7,cD7] = dwt(cA6,'db4');
[cA8,cD8] = dwt(cA7,'db4');
[cA9,cD9] = dwt(cA8,'db4');
[cA10,cD10] = dwt(cA9,'db4');
[C,L] = wavedec(chan1,10,'db4');
Now compare:
C(1:L(1))
with
cA10
Likewise, compare
C(L(1)+1:L(1)+L(2))
with
cD10
댓글 수: 2
Wayne King
2013년 3월 9일
It's only necessary if you have gone down to that level in the multiresolution analysis, if you go down to level 10, then you need the the final level approximation coefficients to achieve perfect reconstruction.
추가 답변 (2개)
TONY SINGLA
2013년 8월 17일
hello
i have a doubt that how DWT calculates the values for the cd1,ca1 and cd2,ca2 and so on............... which *|formula |*it uses to calculate the values for the respective C and L values in case of 1D-DWT at multilevel
reply please waiting for your reply
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!