2.11.2.7 mdwt(Pro)
Menu Information
Analysis: Signal Processing: Wavelet: Multi-Scale DWT
Brief Information
Perform multi-level wavelet decomposition
Additional Information
This feature is for OriginPro only.
Command Line Usage
1. mdwt ix:=2 level:=4;
2. mdwt ix:=2 type:=db2 level:=5;
X-Function Execution Options
Please refer to the page for additional option switches when accessing the x-function from script
Variables
Display Name
|
Variable Name
|
I/O and Type
|
Default Value
|
Description
|
Input
|
ix
|
Input
vector
|
<active>
|
Specify the input signal
|
Wavelet Type
|
type
|
Input
int
|
haar
|
Specify the wavelet type
Option list
- haar:Haar
- Haar wavelet
- db 2:DB2
- Daubechies wavelet (N=4
- db 3:DB3
- Daubechies wavelet (N=6)
- db 4:DB4
- Daubechies wavelet (N=8)
- db 5:DB5
- Daubechies wavelet (N=10)
- db 6:DB6
- Daubechies wavelet (N=12)
- db 7:DB7
- Daubechies wavelet (N=14)
- db 8:DB8
- Daubechies wavelet (N=16)
- db 9:DB9
- Daubechies wavelet (N=18)
- db 10:DB10
- Daubechies wavelet (N=20)
- b11:Bior1.1
- Biorthogonal (Nr=1, Nd=1)
- b13:Bior1.3
- Biorthogonal (Nr=1, Nd=3)
- b15:Bior1.5
- Biorthogonal (Nr=1, Nd=5)
- b22:Bior2.2
- Biorthogonal (Nr=2, Nd=2)
- b24:Bior2.4
- Biorthogonal (Nr=2, Nd=4)
- b26:Bior2.6
- Biorthogonal (Nr=2, Nd=6)
- b28:Bior2.8
- Biorthogonal (Nr=2, Nd=8)
- b31:Bior3.1
- Biorthogonal (Nr=3, Nd=1)
- b33:Bior3.3
- Biorthogonal (Nr=3 Nd=3)
- b35:Bior3.5
- Biorthogonal (Nr=3, Nd=5)
- b37:Bior3.7
- Biorthogonal (Nr=3, Nd=7)
|
Extension Mode
|
ext
|
Input
int
|
periodic
|
Specify the end extension mode used in wavelet transform
Option list
- periodic:Periodic
- The input signal will be viewed as periodic.
- pad0:Zero -padded
- The data points outside the input range will be viewed as zeroes.
|
Decomposition Level
|
level
|
Input
int
|
1
|
Specify the number of levels for which detail coefficients are to be thresholded. A large level will cause more noise to be removed; but unfortunately the probability that the useful signal is distorted will be larger, compared with a small level.
|
Multiple Coeff Data
|
rd
|
Output
ReportData
|
[<input>]<new>!
|
Specify the output worksheet for the approximation coefficients and detail coefficients of different levels.
|
Examples
- To perform 4-level wavelet decomposition to data in columns 2 of the active worksheet, use the script command:
mdwt ix:=2 level:=4;
- To specify wavelet type, use the type variable. For example, if you want to use Daubechies wavelet (N=2) to perform 5-level wavelet decomposition to data in column 2, enter the following script command:
mdwt ix:=2 type:=db2 level:=5;
// Wavelet decomposition and reconstruction with two different wavelet types
//Create a new workbook and import sample data
newbook name:="Wavelet Demo" sheet:=1;
fname$=system.path.program$ + "Samples\Signal Processing\Step Signal With Random Noise.dat";
impasc;
//Multi-level wavelet decomposition using two wavelet types
mdwt ix:=col(2) type:=haar level:=3 rd:=[<input>]"Haar";
mdwt ix:=1!col(2) type:=db7 level:=3 rd:=[<input>]"DB7";
//Reconstruction
idwt ca:=2!1 cd:=2!2 type:=haar;
idwt ca:=2!5 cd:=2!3 type:=haar;
idwt ca:=2!6 cd:=2!4 type:=haar;
idwt ca:=3!1 cd:=3!2 type:=db2;
idwt ca:=3!5 cd:=3!3 type:=db2;
idwt ca:=3!6 cd:=3!4 type:=db2;
//Report
newsheet name:="report" labels:="|Haar|DB7";
wcolwidth irng:=1:3 width:="15";
wrowheight irng:=col(1)[1:5] height:=5;
wcellcolor irng:=col(1)[1:5] color:=color(249, 236, 151);
col(1)[1]$="CA3";
col(1)[2]$="CD3";
col(1)[3]$="CD2";
col(1)[4]$="CD1";
col(1)[5]$="Reconstructed";
//Insert sparklines for coefficients and reconstructed signals
insertSparklines irng:=(2!1:4, 2!7) name:=0 orng:=col(2)[1];
insertSparklines irng:=(3!1:4, 3!7) name:=0 orng:=col(3)[1];
window -z; //Maximize window
More Information
For more information, please refer to our User Guide.
Related X-Functions
dwt, idwt, wtsmooth
Keywords:decompose
|