-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimTurnOffBetaIBstats.m
More file actions
53 lines (44 loc) · 1.12 KB
/
simTurnOffBetaIBstats.m
File metadata and controls
53 lines (44 loc) · 1.12 KB
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
filepath='turnOffBeta-IB';
saveOutput=true;
defaultParams; % call first to set parameters not set below
%numCellsBase=5;
turnOffBeta=1;
inhibitoryPulse1Start=500;
inhibitoryPulse1Length=120;
inhibitoryPulse1Length=200; % test
turnOffTarget='IB';
numSims=10; % per amplitude value
amps=0.1:0.2:1.5;
%amps=0.5;
numAmps=length(amps);
probaOff=zeros(numAmps,1);
for aa=1:numAmps
turnOffAmp=amps(aa)
numOffs=0;
for sim=1:numSims
sim
networkSim;
rastFig=figure(1);
clf
hold on
rastergram;
hold off
drawnow;
turnOffAmp
numOffs=numOffs+turnedOff(fullV,150,largeDt)
end
probaOff(aa)=numOffs/numSims
end
h=figure(2);
ax=gca;
plot(amps,probaOff,'LineWidth',2','Color','b')
ax.FontWeight='bold';
ax.FontSize=14;
ax.XLabel.String='Inhibitory pulse amplitude';
ax.YLabel.String='Turn off probability';
fullFilepath=strcat(folder,'/',filepath,'-probaGraph');
if saveOutput
saveas(h,fullFilepath,'fig');
saveas(h,fullFilepath,'png');
save(strcat(fullFilepath,'.mat'),'amps','probaOff')
end