A Trous wavelet decomposition - Programmers Heaven

#### Howdy, Stranger!

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

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# A Trous wavelet decomposition

Posts: 2Member
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
%

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.