Hi Lorena, you have to determine the equivalent filter at each level of the wavelet tree. As a simple example, I'll show you how to compare the db4 scaling filter at level 1 and level 2.
Note to get the equivalent scaling filter at level 2 you have to lowpass filter at level 1 followed by downsampling by two and then lowpass filter for level 2.
[LoD,HiD] = wfilters('db4');
[H1,W1] = freqz(LoD);
scal2 = conv(upsample(LoD,2),LoD)./sqrt(2);
[H2,W2] = freqz(scal2);
plot(W1,abs(H1),'k'); hold on;
plot(W2,abs(H2),'r');
legend('Level 1 Scaling Filter','Level 2 Scaling Filter');
xlabel('Radians/sample'); ylabel('Magnitude');
This is for 1st and 2nd level db4 wavelet (detail) filters.
[LoD,HiD] = wfilters('db4');
[H1,W1] = freqz(HiD);
wav2 = conv(upsample(HiD,2),LoD)./sqrt(2);
[H2,W2] = freqz(wav2);
plot(W1,abs(H1),'k'); hold on;
plot(W2,abs(H2),'r');
axis tight;
legend('Level 1 Wavelet Filter','Level 2 Wavelet Filter', ...
'Location','SouthEast');
xlabel('Radians/sample'); ylabel('Magnitude');
Best Answer