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!