% SvsWV_chirprate.m
%
% P. Flandrin
clf

N = 256;
f0 = .02;
ff = .5;

K = 15;
f = linspace(f0,ff,K);

Nbin = N;
Lh = 255;
h = window(Lh,'Kaiser');

pause

for k = 1:K
	sig = fmlin(N,f0,f(k));
	[s,T,F] = tfrsp(sig,1:N,2*Nbin,h);
	subplot(1,2,1)
	imagesc(flipud(s(1:Nbin,N/4:3*N/4)));
	colormap(jet)
	set(gca,'YTick',[]);set(gca,'XTick',[])
	title('spectrogramme')
	[wv,T,F] = tfrpwv(sig,1:N,Nbin,h.^2);
	subplot(1,2,2)
	imagesc(flipud(wv(:,N/4:3*N/4)+abs(wv(:,N/4:3*N/4))));
	colormap(jet)
	set(gca,'YTick',[]);set(gca,'XTick',[])
	title('pseudo Wigner-Ville')
	pause(.1)
end
