You are on page 1of 1

% Matlab code for Discrete Wavelet Transform (DWT) Decomposition

%
[C,L] = wavedec (currentA,6,'db5');
[d1,d2,d3,d4,d5,d6] = detcoef(C,L,[1,2,3,4,5,6]);
a6 = appcoef(C,L,'db5',6);
%
%subplot(3,3,1); plot(currentC,'b'),hold on,plot (currentA,'r'),plot(currentB,'y'),; title('SLG-C Signal')
%
subplot(3,3,1); plot(currentA,'r'); title('SLG-A Signal')
subplot(3,3,2); plot(a6); title('Approximation A6')
subplot(3,3,3); plot(d6); title('Detail D6')
subplot(3,3,4); plot(d5); title('Detail D5')
subplot(3,3,5); plot(d4); title('Detail D4')
subplot(3,3,6); plot(d3); title('Detail D3')
subplot(3,3,7); plot(d2); title('Detail D2')
subplot(3,3,8); plot(d1); title('Detail D1')
xlabel('Samples')

You might also like