File Exchange

image thumbnail

Wavelet Tech Talks -MATLAB code files

version (68.3 KB) by Kirthi Devleker
MATLAB source code used in Wavelet Tech Talks 3 and 4


Updated 10 Feb 2017

View Version History

View License

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)

Cite As

Kirthi Devleker (2021). Wavelet Tech Talks -MATLAB code files (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

David García Aldea

Namwon Kim

Sunil Kumar

Sanjaya Herath

Godfrey Ojerheghan

Thanks for the video Kirthi Devleker.

meemansha singh

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

Munaza Ramzan

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

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

afiq mohamad

why the .mat file can not be found


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.


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.

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. "


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.

Chamath Silva

Kirthi Devleker

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

Can these be modified to work with 2016a?

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Code/Code/Understanding Wavelets, Part 3 Example Application of Discrete Wavelet Transform/

Code/Code/Understanding Wavelets, Part 4 Example Application of Continuous Wavelet Transform/