Hi Kush, that is because the default extension mode for the DWT is not periodic. First, set the extension mode to 'per'
dwtmode('per');
Then use dwt2()
load woman;
dwtmode('per');
[A,H,V,D] = dwt2(X,'db2');
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!