Discret wavelet transform : implementation of mallat algorithm and output lengh at each level.

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
  1 个评论
haithem
haithem 2013-9-17
% code
end
sorry here is the code once again because it didn't appear as it should
% 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 个)

类别

Help CenterFile Exchange 中查找有关 Signal Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by