DWT 1-D Sorce !!
--------------------------------------------------------------------------------------------------------------------
clear all
% Load original 1D signal.

load leleccum; s = leleccum(1:3920);

plot(s)

ls = length(s);
% Perform one step decomposition of s using db1.

[ca1,cd1] = dwt(s,'db1');
% Perform one step reconstruction of ca1 and cd1.

a1 = upcoef('a',ca1,'db1',1,ls);
d1 = upcoef('d',cd1,'db1',1,ls);
a0 = idwt(ca1,cd1,'db1',ls);

% Perform decomposition at level 3 of s using db1.

[c,l] = wavedec(s,3,'db1');

% Extract approximation coefficients at level 3,
% from wavelet decomposition structure [c,l].

ca3 = appcoef(c,l,'db1',3);
% Extract detail coefficients at levels 1, 2 and 3,
% from wavelet decomposition structure [c,l].

cd3 = detcoef(c,l,3);
cd2 = detcoef(c,l,2);
cd1 = detcoef(c,l,1);

% Reconstruct approximation at level 3,
% from wavelet decomposition structure [c,l].

a3 = wrcoef('a',c,l,'db1',3);

% Reconstruct details at levels 1,2 and 3,
% from the wavelet decomposition structure [c,l].

d3 = wrcoef('d',c,l,'db1',3);
d2 = wrcoef('d',c,l,'db1',2);
d1 = wrcoef('d',c,l,'db1',1);

% Reconstruct s from the wavelet decomposition structure [c,l]

a0 = waverec(c,l,'db1');


사랑해♡ 한준영
Wait while more posts are being loaded