-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_Fig4.m
148 lines (110 loc) · 4.12 KB
/
make_Fig4.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
clear all
trialCOUNT = 1;
b = [0, 0.4470, 0.7410];
o = [0.8500, 0.3250, 0.0980];
y = [0.9290, 0.6940, 0.1250];
p = [0.4940, 0.1840, 0.5560];
g = [0.4660, 0.6740, 0.1880];
a = [0.3010, 0.7450, 0.9330];
r = [0.6350, 0.0780, 0.1840];
%% DATA with rule biased towards depression (with no plastic F -> VIP)
external_stimulation = 3; %3: neither CS nor US; 1: only CS; 2: only US; 3: US+CS
condition = 1; % 0: before FC; 1: during FC; 2: after FC;
%experiment = ...; %0: PV and SOM; 1: without SOM; 2: without PV; 3: neither PV nor SOM; 4: only PV+PN connections; 5: no connections at all; 6: no VIP; 7: with only PV; 8: with only SOM
stdp_rule = 1; %0: asym; 1: asym with larger tau and same amplitude; 2: sym; 3: no rule; 4:no rule but still evolution in time of weight as if there was plasticity
path = '';
filename = 'onlyPVlowexc';
%%
experiment_ = 7; % 7 for only PV (at low excitation level)
trial = 0;
for k = 1:length(experiment_)
experiment = experiment_(k);
M = readmatrix([path,filename,'_cond',num2str(condition),'_stim',num2str(external_stimulation),'_exp',num2str(experiment),'_rule',num2str(stdp_rule),'STDP_',num2str(trial),'.txt']);
% For Fig. 4 main text
%in = 6000/0.05;
%en = 7000/0.05;
% For Fig. S1C
in = 6200/0.05;
en = 6700/0.05;
figure('Renderer', 'painters', 'Position', [10 10 500 100])
plot(M(in:en,1),M(in:en,4),'color',g,'LineWidth',1.5)
hold on
plot(M(in:en,1),M(in:en,6),'color',o,'LineWidth',1.5)
legend('PV','F')
xlim([in*0.05 en*0.05])
figure('Renderer', 'painters', 'Position', [10 10 500 100])
plot(M(in:en,1),M(in:en,4),'color',g,'LineWidth',1.5)
ylabel('PV')
ylim([-100 50])
set(gca, 'fontsize', 14)
xlim([in*0.05 en*0.05])
figure('Renderer', 'painters', 'Position', [10 10 500 100])
plot(M(in:en,1),M(in:en,5),'color',a,'LineWidth',1.5)
hold on
plot(M(in:en,1),M(in:en,6),'color',o,'LineWidth',1.5)
ylim([-100 50])
legend('ECS','F')
set(gca, 'fontsize', 14)
xlim([in*0.05 en*0.05])
figure('Renderer', 'painters', 'Position', [10 10 500 100])
plot(M(in:en,1),M(in:en,9),'r')
hold on
plot(M(in:en,1),M(in:en,10),'b')
legend('P: potentiation', 'M: depression')
xlim([in*0.05 en*0.05])
figure('Renderer', 'painters', 'Position', [10 10 500 100])
plot(M(in:en,1),M(in:en,9),'r')
ylim([0 0.01])
xlim([in*0.05 en*0.05])
figure('Renderer', 'painters', 'Position', [10 10 500 100])
plot(M(in:en,1),M(in:en,10),'b')
ylim([-0.011 0])
xlim([in*0.05 en*0.05])
%legend('P: potentiation', 'M: depression')
tmp = readmatrix([path,filename,'_cond',num2str(condition),'_stim',num2str(external_stimulation),'_exp',num2str(experiment),'_rule',num2str(stdp_rule),'AMPA_ECS_PN_',num2str(trial),'.txt']);
figure('Renderer', 'painters', 'Position', [10 10 500 100])
plot(M(in:en,1),tmp(in:en))
xlim([in*0.05 en*0.05])
figure, plot(M(:,1),tmp(:,1))
end
%%
experiment_ = 1; % no SOM
trial = 0;
path = '';
filename = '';
M = readmatrix([path,filename,'_cond',num2str(condition),'_stim',num2str(external_stimulation),'_exp',num2str(experiment_),'_rule',num2str(stdp_rule),'STDP_',num2str(trial),'.txt']);
% For Fig. 4 main text
in = 12200/0.05;%160000;
en = 13200/0.05;%170000;
% For Fig. S1D
in = 12700/0.05;%160000;
en = 13200/0.05;%170000;
figure,
plot(M(in:en,1),M(in:en,2))
set(gca, 'fontsize', 14)
xlim([in*0.05 en*0.05])
figure,
plot(M(in:en,1),M(in:en,5),'color',a,'LineWidth',1.5)
hold on
plot(M(in:en,1),M(in:en,6),'color',o,'LineWidth',1.5)
legend('ECS','F')
xlabel('[ms]')
set(gca, 'fontsize', 14)
xlim([in*0.05 en*0.05])
figure,
plot(M(in:en,1),M(in:en,10),'b')
ylim([-0.01 0])
xlabel('[ms]')
xlim([in*0.05 en*0.05])
figure,
plot(M(in:en,1),M(in:en,9),'r')
ylim([0 0.01])
xlabel('[ms]')
legend('potentiation')
set(gca, 'fontsize', 14)
xlim([in*0.05 en*0.05])
tmp = readmatrix([path,filename,'_cond',num2str(condition),'_stim',num2str(external_stimulation),'_exp',num2str(experiment_),'_rule',num2str(stdp_rule),'AMPA_ECS_PN_',num2str(trial),'.txt']);
figure, plot(M(in:en,1),tmp(in:en,1))
ylim([0 0.02])
xlim([in*0.05 en*0.05])
figure, plot(M(1:end,1),tmp(1:end,1))