From: mahmud_dbm on
Dear Sir,

I have a very basic doubt about this technical term,"Wavelet Packet Decomposition"
As it goes in Wireless communication wavelet packet decomposition, wavedec(x,l,wname) helps to decompose, and wpdec(x,wname) finds the Tree.

now If i want to do this "Wavelet Packet Decomposition".. which one should i use.. and if i use wpdec() i am getting the Tree only, how do i get the transformed signal then..?? Or i think i am missing some basic here... how do i get the transformed signal.

thank you.
From: Wayne King on
"mahmud_dbm " <mahmud_dbm(a)yahoo.com> wrote in message <hku1v4$2e9$1(a)fred.mathworks.com>...
> Dear Sir,
>
> I have a very basic doubt about this technical term,"Wavelet Packet Decomposition"
> As it goes in Wireless communication wavelet packet decomposition, wavedec(x,l,wname) helps to decompose, and wpdec(x,wname) finds the Tree.
>
> now If i want to do this "Wavelet Packet Decomposition".. which one should i use.. and if i use wpdec() i am getting the Tree only, how do i get the transformed signal then..?? Or i think i am missing some basic here... how do i get the transformed signal.
>
> thank you.

Hi, you are getting the wavelet packet transform with wpdec. It's just returning it in a tree object. I think your confusion is coming from not understanding how the information is stored. You can extract the coefficients from any node in the tree with wpcoef. You can reconstruct a possibly modified wavelet packet tree with wprcoef. For example:

dwtmode('per')
x = randn(512,1); %not a very interesting signal I know
T = wpdec(x,4,'sym4'); % Wavelet packet transform down to level 4.

Note: the wavelet packet transform decomposes the signal into the doublets (j,p) where j is the depth index and p is the number of nodes at the same depth to its left.

You can plot the wavelet packet tree and see this ordering

plot(T)

Beginning with the node (0,0) you can also simply order these nodes: 0,1,2,3,4,5,6, etc. This is the index you need to extract the wavelet packet coefficients. The doublet (0,0) is zero, (1,0) is 1, (1,1) is 2 etc.

You can retrieve this information with depo2ind()

N = depo2ind(2,[2 3]); % get the index for the (2,3) node for a tree of order 2&#8212;the %wavelet packet transform yields a binary tree!

% N equals 6
wp_coefs = wpcoef(T,6); % Retrieve the wavelet packet coefficients for the node %(2,3)

Hope that helps,
Wayne
From: mahmud_dbm on
Thank You Sir... It Really Helped as you explained everything.. and iked you funny commenting styles and all... :)

but what was i planning 2 do is, like we transform a signal into wavelet domain,
we get a transformed signal, and from transformed signal we reconstruct the original signal back.

when i am using this decomposing technique, i get a Tree, and to reconstruct this signal back we need to have this tree... cant we have a full transformed signal, and from that transformed signal we'd reconstruct our original signal. without this Tree stuff
If you'd suggest me to go for wavelet transform simply, but i need this packet decomposition, which should give us a transformed signal...
its here
http://en.wikipedia.org/wiki/Wavelet_packet_decomposition
as i've seen your earlier comments, you can figure it out.
From: Wayne King on
"mahmud_dbm " <mahmud_dbm(a)yahoo.com> wrote in message <hkvt8m$lam$1(a)fred.mathworks.com>...
> Thank You Sir... It Really Helped as you explained everything.. and iked you funny commenting styles and all... :)
>
> but what was i planning 2 do is, like we transform a signal into wavelet domain,
> we get a transformed signal, and from transformed signal we reconstruct the original signal back.
>
> when i am using this decomposing technique, i get a Tree, and to reconstruct this signal back we need to have this tree... cant we have a full transformed signal, and from that transformed signal we'd reconstruct our original signal. without this Tree stuff
> If you'd suggest me to go for wavelet transform simply, but i need this packet decomposition, which should give us a transformed signal...
> its here
> http://en.wikipedia.org/wiki/Wavelet_packet_decomposition
> as i've seen your earlier comments, you can figure it out.

Hi, the "tree stuff" is just for your conceptualization, there really isn't a tree. I guess I'm confused by what you want. You can do a wavelet packet transform with the Wavelet Toolbox as I have shown you. Further, you can access any node of this WP decomposition, modify the coefficients if you like, and reconstruct the signal.

Wayne