# Where is the “time and frequency” in a Discrete Wavelet Transform?

The DWT is motivated by the ability to see signal in time and frequency at the same time, if I understood that correctly.

I am using the following Matlab commands for some signal x:

[A,D] = dwt(x,'db4');


Then I plot A vs some vector t, representing 'time'. I do know the algorithm behind A and D: low (high) pass filter, then downsample by 2.

My questions: Where is the time axis and where is the frequency axis if I all what I have are the coefficients A (approximation) and D (detail)?

Second question: If all of this is a simple filtering and downsampling, I don't see what is new in DWT...

## 1 Answer

DWT is motivated by the ability to analyse the signal in time and frequency with an adaptative time and frequency resolution.

Some clever algorithm allows you to perform a wavelet analysis with a recursive implementation. Matlab's DWT does that, matlab's dwt perform only one level of DWT, therefore, A is only the output of the low-pass filter while D is the output of the high-pass filter. There is no time and frequency here. It only gives you a very coarse information about the time-frequency content of the signal. Please check how to implement a DWT.

Second question : To see the novelty, you have to compare that to short-time frequency transform. With the DWT the time-frequency resolution depend on the frequency while with the STFT it's always the same. This is a VERY DESIRABLE property : You want a short time windows for quicly mooving high frequency signals and a long window for slower low frequency signals.

Moreover, please consider that the filtering/downsampling implementation is a very refined and efficient one. DWT is an incredible tool for analysis, denoising, feature extraction etc ...

• I get a vector of coefficients. This must be one dimension, I believe it is the time, and because I only have one level then I have one level of frequency. Is this right? – student1 Apr 24 '15 at 16:46
• The length of your vector of coeficient should be $\frac{N}{2}$ which is the downsampled and filtered original signal. And indeed you may call that "one level of frequency". in fact, this is not really one level of frequency : this is the output of a filter, so the frequency information you get depends on your filter's frequency response. For instance if the low pass filter allow everything below 50hz to pass without attenuation and eveything above is perfectly blocked, the output coeficients are the 0-50hz component of your original signal. – Antoine Bassoul Apr 24 '15 at 18:29
• What kind of cut off freq. does Matlab use, if I didn't provide it with any such? – student1 Apr 25 '15 at 7:02
• When using matlab's dwt, you must provide at least a wavelet name. Given the wavelet's name the function wfilters will give you the low pass and high pass filters. You can then use the freqz function to analyze the filter's frequency response. – Antoine Bassoul Apr 26 '15 at 9:55