# Difference between a wavelet transform and a wavelet decomposition

I'm confused about the difference between a wavelet transform and a wavelet decomposition is. For example

load woman
[cA1,cH1,cV1,cD1] = dwt2(X,'db1');
[c,s] = wavedec2(X,2,'db1');


What's the difference between these two matlab commands, and when would you want to do one over the other?

I don't think there is any difference. The documentation for dwt2 says

Single-level discrete 2-D wavelet transform

The dwt2 command performs a single-level two-dimensional wavelet decomposition...

While the documentation for wavedec2 says

Multilevel 2-D wavelet decomposition

The difference is that dwt2 is single-level (produces a single A, H, V, D output):

and wavedec2 is multilevel (produces array C output, which contains multiple A, H, V, D inside it):

I think DWT is wavelet tree decomposition while wavedec2 is wavelet packet decomposition. the wavelet packet analysis is similar to the DWT with the only difference that in addition to the decomposition of the wavelet approximation component at each level, the wavelet detail component is also decomposed to obtain its own approximation and detail components as shown in Figure2.the wavelet packet analysis provides better control of frequency resolution for the decomposition of the signal in contrast with DWT.

dwt2 is the single level decomposition

wavedec2 is multilevel decomposition