is here any DSP expert to check my Discret Wavelet Transform code and respond my question please.
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear all,
I know that there are different ways to make the DWT in matlab either by using the function 'wavedec' or using the 'dyadic filter bank 'model in simulink but in both of them, The coefficients output are the artifacts from the convolution of the input signal (vector) and the wavelet/scale functions. for this reason the output signal lengh at each level will be equal to [lengh(input_signal)+lengh(filter)-1] and that is not what i need because the output lengh at each level should be equal to the half of the input lengh. for example if the input signal is 64 samples long then the actual lengths should be 32,16,8,4,2 for cD1,cD2,cD3.. respectively without taking the filter lengh into account. to solve this problem i tried to writte a matlab code wich descripe the real mallat algorithm. the written code(see below)did function but the problem is that the difference between values produced using this code and wavedec function() at each level is big . My question is: why the output values at each level are unacceptable although the code is right,? is there another way to implement this algorithm or to have the desired output length?
thank you in advance for your answers
*matlab code
% load a signal
load noisdopp
x = noisdopp;
N = length(x);
% Lo_D the decomposition low pass filter
% Hi_D the decomposition high pass filter
[Lo_D,Hi_D] = wfilters('db40','d');
M = length(Lo_D);
%compute the outputs of the first level of a direct dwt
y00 = dyaddown(filter(Lo_D,1,x),1);
y01 = dyaddown(filter(Hi_D,1,x),1);
%compute the outputs of the second level of a direct dwt
y10 = dyaddown(filter(Lo_D,1,y00),1);
y11 = dyaddown(filter(Hi_D,1,y00),1);
%compute the outputs of the third level of a direct dwt
y20 = dyaddown(filter(Lo_D,1,y10),1);
y21 = dyaddown(filter(Hi_D,1,y10),1);
%compute the outputs of the fourth level of a direct dwt
y30 = dyaddown(filter(Lo_D,1,y20),1);
y31 = dyaddown(filter(Hi_D,1,y20),1);
댓글 수: 0
답변 (1개)
Good mind
2017년 9월 20일
when using dwt or wavedec the length of each coefs is the half comparing with the original signal(because of downsampling), but using swt you get the same length as original signal......ah i m not expert but i m working on wavelet since one year. try with swt(stationary wavelet transform)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!