%% Three scale daub4 resolution
%
% I construct the scaling and wavelet vectors for the three-scale daub4 transform for N=16. I use the command daub4mat from Computer Exploration 3.7.3 to construct the three-scale wavelet analysis matrix W3.

T4 = daub4mat(16); T3 = [daub4mat(8) zeros(8); zeros(8) eye(8)]; 
T2 = [daub4mat(4) zeros(4,12); zeros(4) eye(4) zeros(4,8); zeros(8) eye(8)]
W3 = T2*T3*T4

%
% Notice that the scaling vector (the first row) and coarse wavelet vector (the third row) have all components nonzero; the medium wavelet vector (the fifth row) has six consecutive zeros and the fine wavelet vector (the ninth row) has twelve consective components zero. Contrast this with the three scale Haar transform.
%

plot(W3(1,:))
title('scaling vector')

%

plot(W3(3,:))
title('coarse wavelet vector')

%

plot(W3(5,:))
title('medium wavelet vector')

%

plot(W3(9,:))
title('fine wavelet vector')