% 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);