Question about wavelet and reconstruction
Mostrar comentarios más antiguos
Dear all, I am studying wavelet and focusing on the signal reconstruction. I noticed that the function 'upcoef' just work for the reconstruction: http://cn.mathworks.com/help/wavelet/ref/upcoef.html
At the end of this page, I also noticed that upcoef is equivalent to an N time repeated use of the inverse wavelet transform.
Then I tried to test it with the following code:
t=0:2*pi/999:2*pi;
b0=sin(t);
figure,plot(b0);
[cA,cD]=dwt(b0,'db4',3);
D = upcoef('d',cD,'db4',3,length(b0));
figure,plot(D);
[cA,cD]=dwt(b0,'db4');
[cA,cD]=dwt(cA,'db4');
[cA,cD]=dwt(cA,'db4');
D=idwt([],cD,'db4');
D=idwt([],D,'db4');
D=idwt([],D,'db4',length(b0));
figure,plot(D)
However, results by two methods are different. Could anyone tell me what's wrong in the code?
Thanks, Tang Laoya
3 comentarios
Walter Roberson
el 20 de Sept. de 2016
How different are the results? Could the difference be just numeric roundoff? http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F
tanglaoya
el 20 de Sept. de 2016
tanglaoya
el 20 de Sept. de 2016
Respuestas (1)
Wayne King
el 4 de Oct. de 2016
0 votos
One problem you are having is that DWT does not take the 3 input you are using. DWT only does a single-level wavelet transform unlike wavedec. The 3 input to DWT above is NOT being used. It has no effect on the output.
1 comentario
tanglaoya
el 6 de Oct. de 2016
Categorías
Más información sobre Discrete Multiresolution Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!