input of DWT and output of IDWT not same?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I tried to test out the dwt and idwt, before i used this code i've build my own formula to work on dwt and idwt. But i figured that my own formula for dwt and idwt the reconstructed value are not the same as the input. so i tried with the built in function.
A=wavread('tes.wav');
leftchanel=A(1:size(A),1);
[cA,cD] = dwt(leftchanel,'haar');
X = idwt(cA,cD,'haar');
check=leftchanel-X;
from this code i got check not all value are 0, that mean leftchanel is not the same as X ( the input for dwt and the output of idwt are mostly same but some are different ). The main question from me is "Aren't the after we decompose(DWT) and reconstruct(IDWT) the input and the output should be same (exactly same)?"
0 Kommentare
Antworten (1)
Wayne King
am 13 Mär. 2013
Bearbeitet: Wayne King
am 13 Mär. 2013
When you say they are not zero how large is the difference? You have to keep in mind that there may be small numerical differences. For example:
x = randn(1024,1);
[A,D] = dwt(x,'haar');
xrec = idwt(A,D,'haar');
max(abs(x-xrec))
For the above particular random signal, the largest absolute value of the difference is 10^{-16}. That is as equal as you can get.
3 Kommentare
Siehe auch
Kategorien
Mehr zu Discrete Multiresolution Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!