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

chansiufung76chansiufung76 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
%
% 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);
end
dwt(:,d+1) = iconv(hidyadf,s)';
for j = 1:2^(d)
p = lshift(dwt(:,d+1)');
dwt(:,d+1) = p';
end
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;
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.

Comments

  • maheswaran27maheswaran27 Posts: 1Member
    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

    Bye
    Mahes
Sign In or Register to comment.