% Compute and plot the Wigner-Ville distribution 
% of a signal composed of 2 different Gabor atoms
% whose internal frequencies progressively increase:

for q=0.2:0.05:3.65;
sc=q./5;

t=-10:0.05:12;
ta=-10:0.05:10;
b1=0;
a1=1.5;
b3=-5;
b2=6;
oo=3.5;
gt3=(exp((-((ta-b3)).^2)).*(exp(i.*(q.*(oo).*pi).*((ta-b3)))));
g2=(exp((-((t-b2)).^2)).*(exp(i.*(q.*(5.5).*pi).*((t-b2))))); %5.5

s=gt3(20:170);
s1=g2(80:440);
J=[s s1];
po=real(J);
x=po';

pause(0.00000000000001);
r1=subplot(211);
l1=plot(po,'b','markersize',5);
axis([1 length(J) min(po) max(po)]);
ylabel('2 Atoms'); 
r2=subplot(212);
wvdist(po);
axis([0 1 0 0.5]);
set(r1,'position',[0.1 0.77 0.85 0.2]);
set(r2,'position',[0.1 0.1 0.85 0.66]);
end

% "Complex and Chaotic Nonlinear Dynamics. 
% Advances in Economics and Finance, 
% Mathematics and Statistics" 
% T.Vialar, Springer 2009.
% Copyright(c).