% Example, Time-Frequency Analysis Course
% Signal with three frequencies.


t=[1:1024]./512;
l=8 %Length of Daubechies filter
[h,g,rh,rg]=daub(l);
k=6;
n=64;
x=zeros(1,1024);
for s=2:2:6
x=sin(2.017*n*s/2*pi*(t))+x;
end
b=k*ones(1,2^k); % Wavelet packet level k=6 basis
y=wpk(x,h,g,0,b);
figure
tfp4(b,y) %Plot of time-frequency plane

b=[5 5 4 3 2 1]; %Usual wavelet basis
y=wpk(x,h,g,0,b);
figure
tfp4(b,y)

