Decomposion a 1D signal into differnt sub band using wavelet
Show older comments
Hi I am working on wavelet and I am new in this field.I want to decompose a signal into multiple band.So I use wavedec() to decompose a signal into 5 level and use wrcoef() to reconstruct individual band.But problem is that when I sum 5 band then this signal is more differ than Original signal. plz any body help me about this. Here my code..
load sumsin; s = sumsin;
figure;plot(s);
% Perform decomposition at level 5 of s using sym4.
[c,l] = wavedec(s,5,'sym4');
% Reconstruct approximation at level 5,
% from the wavelet decomposition structure [c,l].
a1= wrcoef('a',c,l,'sym4',1);
a2 = wrcoef('a',c,l,'sym4',2);
a3 = wrcoef('a',c,l,'sym4',3);
a4 = wrcoef('a',c,l,'sym4',4);
a5 = wrcoef('a',c,l,'sym4',5);
figure; subplot(5,1,1); plot(a1); title('Approximation at level 1');
subplot(5,1,2); plot(a2); title('Approximation at level 2');
subplot(5,1,3); plot(a3); title('Approximation at level 3');
subplot(5,1,4); plot(a4); title('Approximation at level 4');
subplot(5,1,5); plot(a5); title('Approximation at level 5');
figure;plot(a1+a2+a3+a4+a5);title('Reconstruct Original signal');
1 Comment
Maryam
on 9 Apr 2019
You should calculate d1+d2+d3+d4+d5+a5 to get the original signal. Check https://au.mathworks.com/help/wavelet/ref/wavedec.html
Answers (0)
Categories
Find more on Signal Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!