File Exchange

## Wavelet Tech Talks -MATLAB code files

version 1.1.0.0 (68.3 KB) by Kirthi Devleker

### Kirthi Devleker (view profile)

MATLAB source code used in Wavelet Tech Talks 3 and 4

Updated 10 Feb 2017

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Watch the videos in this series to learn the basics behind applications such as wavelet-based denoising and compression. You will learn fundamental concepts in wavelet analysis such as what wavelets are and how to scale and shift them. You will get an overview of the continuous and discrete wavelet transforms, and you will also see example applications of how to use these transforms in MATLAB (Videos Part 3 and Part 4)
http://www.mathworks.com/videos/series/understanding-wavelets-121287.html

Sunil Kumar

Sanjaya Herath

### Sanjaya Herath (view profile)

Godfrey Ojerheghan

### Godfrey Ojerheghan (view profile)

Thanks for the video Kirthi Devleker.

meemansha singh

### meemansha singh (view profile)

In the program, 'f' and 'f0' are not defined hence we are getting error.

Munaza Ramzan

### Munaza Ramzan (view profile)

Thanks for this tutorial.
The function is not working. I am using matlab 2014.

Undefined function 'plotDetCoefHelper' for input arguments of type 'cell/double'.

why the .mat file can not be found

Signal Processing Community Profile

### Signal Processing Community Profile (view profile)

Here is an example that goes over the details:

https://www.mathworks.com/help/wavelet/ug/morse-wavelets.html

Baha411

### Baha411 (view profile)

And can I ask you a favor?
- Could you give an example on how to plot each wevelets that are obtained by cwt?
- Location of those wavelets on time history?
- And how those wavelets are added up (probably augmented too) to create reconstructed signal (without using icwt)?
I am sure this should be very easy for you but these would be of great help to better understand wavelets for others.
Regards,
Baha

Baha411

### Baha411 (view profile)

Yeah I think they gave you wrong information. You can get the time step from the time vector t(2)-t(1) and Fs = 1/dt, you can use this. The important frequencies of earthquakes are usually around 0.5-20Hz and accelerometers usually record conventionally at 0.005-0.01 sec intervals.

For the example you used:
dt = t(2)-t(1);
Fs = 1/dt;
% with that EQ energy is confined around 2-4 Hz but there are contributions of other frequencies too.
icwt(WT, F, [0.5 20],'SignalMean',mean(kobe));
% this reconstructs most of the recording well.

Regardless of this simple issue, these examples are very instructive, thank your for preparing them.
Regards,
Baha

Signal Processing Community Profile

### Signal Processing Community Profile (view profile)

Thank you for your feedback. Here is the description of the data...

"The data are seismograph (vertical acceleration, nm/sq.sec) measurements recorded at Tasmania University, HobarTRUE, Australia on 16 January 1995 beginning at 20:56:51 (GMTRUE) and continuing for 51 minutes at 1 second intervals. "

Baha411

### Baha411 (view profile)

Thanks for introducing these examples.
However, you are using wrong Fs; therefore, all the freq values you obtain are meaningless.
0.03-0.06 Hz if you say this to an earthquake engineer, he is gonna laugh at you.

One more thing, after fixing Fs, don't narrow the range much especially higher frequency components are very important for an EQ signal.
Regards,
Baha

Chamath Silva

Kirthi Devleker

### Kirthi Devleker (view profile)

MATLAB R2016b is required to run the code for Application of Continuous Wavelet Transform example. The application of Discrete Wavelet Transform would work on R2016a.

Joshua Hajicek

### Joshua Hajicek (view profile)

Can these be modified to work with 2016a?