Download docx - DWT and IDWT code in matlab

Transcript
Page 1: DWT and IDWT code in matlab

x=[1 2 3 4 2 3 4 1];subplot(3,1,1);stem(x);[a,b]=dwt(x,'db1');subplot(3,1,2);stem(a);subplot(3,1,3);stem(b);x=IDWT(a,b,'db1')

Coefficients of DWT:

a =2.1213 4.9497 3.5355 3.5355

b = -0.7071 -0.7071 -0.7071 2.1213

Reconstruction of original signal by IDWT:

x =1.0000 2.0000 3.0000 4.0000 2.0000 3.0000 4.0000 1.0000

Recommended