% Example, Time-Frequency Analysis course
% time localized signal (spikes)
t=[1:1024]./512;
l=4 %Length 4 Daubechies filter
[h,g,rh,rg]=daub(l);
k=5;
n=64;
x=zeros(1,1024);
x(300)=25;
x(500:700)=ones(size(x(500:700)));
x(900)=15;
b=k*ones(1,2^k); %Wavelet packet level k=6 basis
y=wpk(x,h,g,0,b);
figure
tfp4(b,y)

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