-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFigure7_desynchronize_fourpatterns.m
108 lines (96 loc) · 3.99 KB
/
Figure7_desynchronize_fourpatterns.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
% Lo script richiede che siano già costruiti i pattern; si faccia uso della prima sezione
% di MAIN a tal scopo.
%% test rete intera (DESYNC) - WM + L1,L2,L3
%no feedback L3->L2, connessioni tra L1 e WM (sia in avanti sia in feedback)
%triplicate.
clc
close all
clear
MAIN
t_sim=0.5;
dt=0.0001;
t=0:dt:t_sim;
train_flag=0;
M_fac = 1.7*2/3; % multiplicative factor, representing attention
load_sinapsi
Wp_WML1=Wp_WML1*3; %feedback L1->WM maggiorato
Wp_L1WM=Wp_L1WM*3; %propagazione in avanti WM->L1 maggiorata
INPUT_WM=zeros(numero_colonne,length(t));
pos=find(corrupt_pattern(sum(all_patterns(:,1:4),2))==1);
nP=4;
INPUT_WM(pos,1:499)=1;
if nP > 4
A_L2L2=A_L2L2*M_fac;
A_L3L3=A_L3L3*M_fac;
else
A_L2L2=A_L2L2*2/3;
A_L3L3=A_L3L3*2/3;
end
% if nP>5
% A_L2L2=A_L2L2*(1.025+0.025*(nP-3)); %da +2.5% a +15%
% A_L3L3=A_L3L3*(1.025+0.025*(nP-3));
% else
% if nP == 5
% A_L2L2=A_L2L2*1.15;
% A_L3L3=A_L3L3*1.15;
% else
% A_L2L2=A_L2L2*2/3;
% A_L3L3=A_L3L3*2/3;
% end
% end
reteWM_desync
fonte = 14;
linea = 1;
figure
subplot(411), hold on, ylabel('zp WM')
plot(t,sum(zp0(pos1,:))/size(pos1,2),'b','linewidth',linea)
plot(t,sum(zp0(pos2,:))/size(pos2,2),'r','linewidth',linea)
plot(t,sum(zp0(pos3,:))/size(pos3,2),'g','linewidth',linea)
plot(t,sum(zp0(pos4,:))/size(pos4,2),'k','linewidth',linea)
plot(t,sum(zp0(pos5,:))/size(pos5,2),'c','linewidth',linea)
plot(t,sum(zp0(pos6,:))/size(pos6,2),'b--','linewidth',linea)
plot(t,sum(zp0(pos7,:))/size(pos7,2),'r--','linewidth',linea)
plot(t,sum(zp0(pos8,:))/size(pos8,2),'g--','linewidth',linea)
plot(t,sum(zp0(pos9,:))/size(pos9,2),'k--','linewidth',linea)
set(gca,'fontsize',fonte)
subplot(412), hold on, ylabel('zp L1')
plot(t,sum(zp1(pos1,:))/size(pos1,2),'b','linewidth',linea)
plot(t,sum(zp1(pos2,:))/size(pos2,2),'r','linewidth',linea)
plot(t,sum(zp1(pos3,:))/size(pos3,2),'g','linewidth',linea)
plot(t,sum(zp1(pos4,:))/size(pos4,2),'k','linewidth',linea)
plot(t,sum(zp1(pos5,:))/size(pos5,2),'c','linewidth',linea)
plot(t,sum(zp1(pos6,:))/size(pos6,2),'b--','linewidth',linea)
plot(t,sum(zp1(pos7,:))/size(pos7,2),'r--','linewidth',linea)
plot(t,sum(zp1(pos8,:))/size(pos8,2),'g--','linewidth',linea)
plot(t,sum(zp1(pos9,:))/size(pos9,2),'k--','linewidth',linea)
set(gca,'fontsize',fonte)
subplot(413), hold on, ylabel('zp L2')
plot(t,sum(zp2(pos1,:))/size(pos1,2),'b','linewidth',linea)
plot(t,sum(zp2(pos2,:))/size(pos2,2),'r','linewidth',linea)
plot(t,sum(zp2(pos3,:))/size(pos3,2),'g','linewidth',linea)
plot(t,sum(zp2(pos4,:))/size(pos4,2),'k','linewidth',linea)
plot(t,sum(zp2(pos5,:))/size(pos5,2),'c','linewidth',linea)
plot(t,sum(zp2(pos6,:))/size(pos6,2),'b--','linewidth',linea)
plot(t,sum(zp2(pos7,:))/size(pos7,2),'r--','linewidth',linea)
plot(t,sum(zp2(pos8,:))/size(pos8,2),'g--','linewidth',linea)
plot(t,sum(zp2(pos9,:))/size(pos9,2),'k--','linewidth',linea)
set(gca,'fontsize',fonte)
subplot(414), hold on, ylabel('zp L3')
plot(t,sum(zp3(pos1,:))/size(pos1,2),'b','linewidth',linea)
plot(t,sum(zp3(pos2,:))/size(pos2,2),'r','linewidth',linea)
plot(t,sum(zp3(pos3,:))/size(pos3,2),'g','linewidth',linea)
plot(t,sum(zp3(pos4,:))/size(pos4,2),'k','linewidth',linea)
plot(t,sum(zp3(pos5,:))/size(pos5,2),'c','linewidth',linea)
plot(t,sum(zp3(pos6,:))/size(pos6,2),'b--','linewidth',linea)
plot(t,sum(zp3(pos7,:))/size(pos7,2),'r--','linewidth',linea)
plot(t,sum(zp3(pos8,:))/size(pos8,2),'g--','linewidth',linea)
plot(t,sum(zp3(pos9,:))/size(pos9,2),'k--','linewidth',linea)
xlabel('time (s)')
set(gca,'fontsize',fonte)
if SET_PATT==3
subplot(411), plot(t,sum(zp0(pos10,:))/size(pos10,2),'c--','linewidth',linea)
subplot(412), plot(t,sum(zp1(pos10,:))/size(pos10,2),'c--','linewidth',linea)
subplot(413), plot(t,sum(zp2(pos10,:))/size(pos10,2),'c--','linewidth',linea)
subplot(414), plot(t,sum(zp3(pos10,:))/size(pos10,2),'c--','linewidth',linea)
end
legend('obj1','obj2','obj3','obj4','obj5','obj6','obj7', 'obj8','obj9')