0% found this document useful (0 votes)
577 views1 page

DWT and IDWT Code in Matlab

This document performs a discrete wavelet transform (DWT) on a signal x using the Haar wavelet, plots the original signal, DWT coefficients a and b, and verifies reconstruction by performing the inverse DWT (IDWT) which recovers the original signal x. The DWT decomposes the signal into coarse and detail coefficients a and b, and IDWT combines these to reconstruct x, demonstrating the transform is reversible.

Uploaded by

mkrishnad
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
577 views1 page

DWT and IDWT Code in Matlab

This document performs a discrete wavelet transform (DWT) on a signal x using the Haar wavelet, plots the original signal, DWT coefficients a and b, and verifies reconstruction by performing the inverse DWT (IDWT) which recovers the original signal x. The DWT decomposes the signal into coarse and detail coefficients a and b, and IDWT combines these to reconstruct x, demonstrating the transform is reversible.

Uploaded by

mkrishnad
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 1

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

You might also like