-
Notifications
You must be signed in to change notification settings - Fork 0
/
henongen_func.m
65 lines (50 loc) · 1.17 KB
/
henongen_func.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
function signal=henongen_func(u,b,d,tipo)
% Programa para simular registros de EEG usando mapas de Henon
% ('Detection of coupling with linear and nonlinear synchronization
% measures for EEG'.Bakhshayesh, 2014)
% ('Learning driver-response relationships from synchronization
% patterns'.Quiroga, 2000)
%
% x(k+1)=1.4+bx(k-1)-x^2(k)
% y(k+1)=1.4+dy(k-1)-[ux(k)+(1-u)y(k)]y(k)
%
% u = 0 --> no coupling u = 1 --> full coupling
%
% b = 0.3 y d = 0.3 --> identical systems
% b = 0.3 y d = 0.1 --> identical systems
%
% Fabricio Baglivo 2016
x1=0;
x2=0;
%
% u=0.6; % Coupling Strengh
%
% b=0.3;
% d=0.1;
x(1)=x1;
x(2)=x2;
y(1)=0;
y(2)=0;
y(3)=0;
y(4)=0;
% Signal calculation
for k=2:65000
x(k+1)=1.4+b*x(k-1)-x(k)^2;
y(k+1)=1.4+d*y(k-1)-[u*x(k)+(1-u)*y(k)]*y(k);
end
%Graphical verification
%%
% for k=50000:60000
%
%
% scatter(x(k+1),x(k),'filled','r');
% % scatter3(x(k),x(k+2),x(k+4),'filled','r');
% hold on
%
% end
%%
signal(:,1)=x(30000:65000);
signal(:,2)=y(30000:65000);
%%
save(['C:/Users/Fabri/Documents/Documentos/PhD/Papers/EnProceso/Metodos/Scripts/Mats/signals_' num2str(u) 'coupled' tipo '.mat'], 'signal','u','b','d');
end