# 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
%
% IWT_ATrou, MakeATrouFilter
%

[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);
end
for j = 1:2^(d)
p = lshift(dwt(:,d+1)');
dwt(:,d+1) = p';
end

end;

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.

#### Howdy, Stranger!

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