% Load the signal "cac40", then,
% compute its Cohen time-Frequency Distrinution.

disp('Wait for outcome or type "ctrl c".')

load cac40.m;
sig=diff(cac40);

% Determination of Sigma: 
% (e.g., sigma=10,..,100,..,600,..).

az=length(sig);

fg=figure;
r1=subplot(211);
l1=plot(sig,'b','markersize',5);
axis([1 length(sig) min(sig) max(sig)]);
r2=subplot(212);cwd =CohenDist(sig,az);
set(r1,'position',[0.1 0.77 0.85 0.2]);
set(r2,'position',[0.1 0.1 0.85 0.66]);

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