A Trous wavelet decomposition

Dear all friends,

I am very new with Matlab. I am currently working on a flow forecasting project. I have a set of water flow data. My professor ask me to do A Trous decomposition for 10 levels. Therefore I use the following Matlab code:

function dwt = FWT_ATrou(x,L);
% FWT_ATrou -- Fast Dyadic Wavelet Transform (periodized, orthogonal)
% Usage
% dwt = FWT_ATrou(x,L)
% Inputs
% x 1-d signal; length(x) = 2^J = n
% L Coarsest Level of V_0; L << J
% Outputs
% dwt an n times J-L+1 matrix
% giving the wavelet transform of x at all dyadic scales.
% Description
% To reconstruct use IWT_ATrou
% See Also
% IWT_ATrou, MakeATrouFilter
[lodyadf,dlodyadf,hidyadf,dhidyadf] = MakeATrouFilter('Spline',3);

[n,J] = dyadlength(x) ;
D = J-L;
dwt = zeros(n,D+1);
x = ShapeAsRow(x);
dwt(:,1) = x';
for d = 1:D,
s = dwt(:,1)';
s2 = s;
for j = 1:2^(d-1)
s2 = lshift(s2);
dwt(:,d+1) = iconv(hidyadf,s)';
for j = 1:2^(d)
p = lshift(dwt(:,d+1)');
dwt(:,d+1) = p';
dwt(:,1) = iconv(lodyadf,s2)';

f = zeros(1,2*length(lodyadf));
f(1:2:2*length(lodyadf)-1) = lodyadf;

f2 = zeros(1,2*length(hidyadf));
f2(1:2:2*length(hidyadf)-1) = hidyadf;

lodyadf = f;
hidyadf = f2;

I have set up my data as X, then I just randomly put a number for L. I am start getting confuse here. Can anyone give me some advices to move forward ? Please.


  • Hai, I am also working on a similar problem using A trous wavelet algorithm. Put the size of X to be 2^N and L shpuld be less than N. I think you are using wavelab for this purpose. You should also have an eye on the boundary treatment if you are dealing with non-stationary data.

    my email id is [email protected] If you want you can contact me for further details

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion