Wavelet Toolbox™
User's Guide
Michel Misiti
Yves Misiti
Georges Oppenheim
Jean-Michel Poggi
R2015b
How to Contact MathWorks
Latest news:
Sales and services:
User community:
Technical support:
Phone:
www.mathworks.com
www.mathworks.com/sales_and_services
www.mathworks.com/matlabcentral
www.mathworks.com/support/contact_us
508-647-7000
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098
Wavelet Toolbox™ User's Guide
© COPYRIGHT 1997–2015 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used
or copied only under the terms of the license agreement. No part of this manual may be photocopied or
reproduced in any form without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation
by, for, or through the federal government of the United States. By accepting delivery of the Program
or Documentation, the government hereby agrees that this software or documentation qualifies as
commercial computer software or commercial computer software documentation as such terms are used
or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and
conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and
govern the use, modification, reproduction, release, performance, display, and disclosure of the Program
and Documentation by the federal government (or other entity acquiring for or through the federal
government) and shall supersede any conflicting contractual terms or conditions. If this License fails
to meet the government's needs or is inconsistent in any respect with federal procurement law, the
government agrees to return the Program and Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Revision History
March 1997
September 2000
June 2001
July 2002
June 2004
July 2004
October 2004
March 2005
June 2005
September 2005 Online only
First printing
Second printing
Online only
Online only
Online only
Third printing
Online only
Online only
Fourth printing
March 2006
Online only
September 2006 Online only
March 2007
Online only
September 2007 Online only
Fifth printing
October 2007
Online only
March 2008
Online only
October 2008
March 2009
Online only
September 2009 Online only
March 2010
Online only
September 2010 Online only
April 2011
Online only
September 2011 Online only
March 2012
Online only
September 2012 Online only
March 2013
Online only
September 2013 Online only
March 2014
Online only
Online only
October 2014
March 2015
Online only
September 2015 Online only
New for Version 1.0
Revised for Version 2.0 (Release 12)
Revised for Version 2.1 (Release 12.1)
Revised for Version 2.2 (Release 13)
Revised for Version 3.0 (Release 14)
Revised for Version 3.0
Revised for Version 3.0.1 (Release 14SP1)
Revised for Version 3.0.2 (Release 14SP2)
Minor revision for Version 3.0.2
Minor revision for Version 3.0.3 (Release
R14SP3)
Minor revision for Version 3.0.4 (Release
2006a)
Revised for Version 3.1 (Release 2006b)
Revised for Version 4.0 (Release 2007a)
Revised for Version 4.1 (Release 2007b)
Revised for Version 4.1
Revised for Version 4.2 (Release 2008a)
Revised for Version 4.3 (Release 2008b)
Revised for Version 4.4 (Release 2009a)
Minor revision for Version 4.4.1 (Release
2009b)
Revised for Version 4.5 (Release 2010a)
Revised for Version 4.6 (Release 2010b)
Revised for Version 4.7 (Release 2011a)
Revised for Version 4.8 (Release 2011b)
Revised for Version 4.9 (Release 2012a)
Revised for Version 4.10 (Release 2012b)
Revised for Version 4.11 (Release 2013a)
Revised for Version 4.12 (Release 2013b)
Revised for Version 4.13 (Release 2014a)
Revised for Version 4.14 (Release 2014b)
Revised for Version 4.14.1 (Release 2015a)
Revised for Version 4.15 (Release 2015b)
1
Contents
Acknowledgments
Wavelets, Scaling Functions, and Conjugate
Quadrature Mirror Filters
Wavelet Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Daubechies Wavelets: dbN . . . . . . . . . . . . . . . . . . . . . . . . . .
Symlet Wavelets: symN . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Coiflet Wavelets: coifN . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Biorthogonal Wavelet Pairs: biorNr.Nd . . . . . . . . . . . . . . . . .
Meyer Wavelet: meyr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Gaussian Derivatives Family: gaus . . . . . . . . . . . . . . . . . . .
Mexican Hat Wavelet: mexh . . . . . . . . . . . . . . . . . . . . . . . .
Morlet Wavelet: morl . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Real Wavelets . . . . . . . . . . . . . . . . . . . . . . . . . .
Complex Wavelets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wavelet Families and Associated Properties — I . . . . . . . . .
Wavelet Families and Associated Properties — II . . . . . . . .
Adding Your Own Wavelets . . . . . . . . . . . . . . . . . . . . . . . . . .
Preparing to Add a New Wavelet Family . . . . . . . . . . . . . .
Adding a New Wavelet Family . . . . . . . . . . . . . . . . . . . . . .
After Adding a New Wavelet Family . . . . . . . . . . . . . . . . . .
Lifting Method for Constructing Wavelets . . . . . . . . . . . . . .
Lifting Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Polyphase Representation . . . . . . . . . . . . . . . . . . . . . . . . . .
Split, Predict, and Update . . . . . . . . . . . . . . . . . . . . . . . . . .
Haar Wavelet Via Lifting . . . . . . . . . . . . . . . . . . . . . . . . . .
Bior2.2 Wavelet Via Lifting . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
1-6
1-7
1-7
1-8
1-10
1-12
1-13
1-14
1-15
1-15
1-19
1-21
1-23
1-23
1-28
1-35
1-37
1-38
1-39
1-40
1-41
1-42
v
Lifting Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Primal Lifting from Haar . . . . . . . . . . . . . . . . . . . . . . . . . .
Integer-to-Integer Wavelet Transform . . . . . . . . . . . . . . . . .
Orthogonal and Biorthogonal Filter Banks . . . . . . . . . . . . .
Lifting a Filter Bank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a Quadrature Mirror Filter . . . . . . . . . . . . . . . . . . . .
1-43
1-45
1-46
1-48
1-60
1-67
2
Continuous Wavelet Analysis
1-D Continuous Wavelet Analysis . . . . . . . . . . . . . . . . . . . . . .
Command Line Continuous Wavelet Analysis . . . . . . . . . . . .
Continuous Analysis Using the Graphical Interface . . . . . . .
Importing and Exporting Information from the Graphical
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Time-Frequency Analysis of Modulated Signals . . . . . . . . .
Remove Time-Localized Frequency Components . . . . . . . .
Time-Varying Coherence . . . . . . . . . . . . . . . . . . . . . . . . . . . .
One-Dimensional Complex Continuous Wavelet Analysis .
Complex Continuous Analysis Using the Command Line . . .
Complex Continuous Analysis Using the Graphical Interface
Importing and Exporting Information from the Graphical
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DFT-Based Continuous Wavelet Analysis . . . . . . . . . . . . . . .
CWT of Sum of Disjoint Sinusoids . . . . . . . . . . . . . . . . . . . .
Approximate Scale-Frequency Conversions . . . . . . . . . . . . .
Signal Reconstruction from CWT Coefficients . . . . . . . . . . .
Signal Approximation with Modified CWT Coefficients . . . .
Interactive DFT-Based Continuous Wavelet Analysis . . . . .
Manual Selection of CWT Coefficients . . . . . . . . . . . . . . . . .
2-2
2-4
2-8
2-18
2-20
2-25
2-31
2-37
2-38
2-40
2-44
2-45
2-45
2-48
2-51
2-52
2-54
2-59
vi
Contents
Two-Dimensional CWT of Noisy Pattern . . . . . . . . . . . . . . .
2-D Continuous Wavelet Transform App . . . . . . . . . . . . . . .
2-D Continuous Wavelet Transform . . . . . . . . . . . . . . . . . .
2-D CWT App Example . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-63
2-72
2-72
2-73
3
Discrete Wavelet Analysis
Critically Sampled and Oversampled Wavelet Filter Banks .
Double-Density Wavelet Transform . . . . . . . . . . . . . . . . . . . .
Dual-Tree Complex Wavelet Transform . . . . . . . . . . . . . . . .
Dual-Tree Double-Density Wavelet Transforms . . . . . . . . . .
1-D Decimated Wavelet Transforms . . . . . . . . . . . . . . . . . . .
Analysis-Decomposition Functions . . . . . . . . . . . . . . . . . . .
Synthesis-Reconstruction Functions . . . . . . . . . . . . . . . . . .
Decomposition Structure Utilities . . . . . . . . . . . . . . . . . . . .
Denoising and Compression . . . . . . . . . . . . . . . . . . . . . . . .
One-Dimensional Analysis Using the Command Line . . . . .
One-Dimensional Analysis Using the Graphical Interface . .
Importing and Exporting Information from the Graphical
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Fast Wavelet Transform (FWT) Algorithm . . . . . . . . . . . . . .
Filters Used to Calculate the DWT and IDWT . . . . . . . . . .
Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Why Does Such an Algorithm Exist? . . . . . . . . . . . . . . . . . .
One-Dimensional Wavelet Capabilities . . . . . . . . . . . . . . . .
Two-Dimensional Wavelet Capabilities . . . . . . . . . . . . . . . .
Border Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Signal Extensions: Zero-Padding, Symmetrization, and Smooth
Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Nondecimated Discrete Stationary Wavelet Transforms
(SWTs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-Decimated DWT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How to Calculate the -Decimated DWT: SWT . . . . . . . . . . .
Inverse Discrete Stationary Wavelet Transform (ISWT) . . .
3-2
3-3
3-6
3-10
3-12
3-12
3-12
3-12
3-12
3-14
3-22
3-36
3-45
3-45
3-48
3-53
3-57
3-58
3-59
3-59
3-68
3-68
3-69
3-73
vii
More About SWT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-73
One-Dimensional Nondecimated Discrete Stationary Wavelet
Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analysis-Decomposition Functions . . . . . . . . . . . . . . . . . . .
Synthesis-Reconstruction Functions . . . . . . . . . . . . . . . . . .
One-Dimensional Analysis Using the Command Line . . . . .
Interactive 1-D Stationary Wavelet Transform Denoising . .
Importing and Exporting from the GUI . . . . . . . . . . . . . . . .
Wavelet Changepoint Detection . . . . . . . . . . . . . . . . . . . . . . .
Scale-Localized Volatility and Correlation . . . . . . . . . . . . .
R Wave Detection in the ECG . . . . . . . . . . . . . . . . . . . . . . .
Wavelet Cross-Correlation for Lead-Lag Analysis . . . . . . .
One-Dimensional Multisignal Analysis . . . . . . . . . . . . . . . .
One-Dimensional Multisignal Analysis — Command Line .
Interactive One-Dimensional Multisignal Analysis . . . . . .
Importing and Exporting Information from the Graphical
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two-Dimensional Discrete Wavelet Analysis . . . . . . . . . . .
Analysis-Decomposition Functions . . . . . . . . . . . . . . . . . . .
Synthesis-Reconstruction Functions . . . . . . . . . . . . . . . . .
Decomposition Structure Utilities . . . . . . . . . . . . . . . . . . .
Denoising and Compression . . . . . . . . . . . . . . . . . . . . . . .
Two-Dimensional Analysis — Command Line . . . . . . . . . .
Interactive Two-Dimensional Wavelet Analysis . . . . . . . . .
Importing and Exporting Information from the Graphical
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two-Dimensional Discrete Stationary Wavelet Analysis .
Analysis-Decomposition Function . . . . . . . . . . . . . . . . . . .
Synthesis-Reconstruction Function . . . . . . . . . . . . . . . . . .
Two-Dimensional Analysis Using the Command Line . . . .
Interactive 2-D Stationary Wavelet Transform Denoising .
Importing and Exporting Information from the Graphical
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-74
3-74
3-74
3-75
3-84
3-88
3-90
3-105
3-116
3-126
3-138
3-138
3-147
3-180
3-187
3-187
3-187
3-187
3-188
3-188
3-196
3-205
3-214
3-214
3-214
3-214
3-222
3-225
viii
Contents