-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfigDistractors.m
More file actions
84 lines (79 loc) · 1.92 KB
/
figDistractors.m
File metadata and controls
84 lines (79 loc) · 1.92 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
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
simTurnOffBetaRSstats;
probaOffRS=probaOff;
ampsRS=amps;
simTurnOffBetaIBstats;
probaOffIB=probaOff;
ampsIB=amps;
if max(abs(ampsRS-ampsIB))>0
warning('Amplitudes different for RS and IB distractors')
end
h=figure(3);
clf
ax=gca;
hold on
plot(ampsRS,probaOffRS,'LineWidth',2','Color','b')
plot(ampsIB,probaOffIB,'LineWidth',2','Color','r')
hold off
ax.FontWeight='bold';
ax.FontSize=14;
ax.XLabel.String='Inhibitory pulse amplitude';
ax.YLabel.String='Turn off probability';
legend(ax,'RS','IB');
filepath='turnOffBeta-probaGraph-both';
fullFilepath=strcat(folder,'/',filepath);
if saveOutput
saveas(h,fullFilepath,'fig');
saveas(h,fullFilepath,'png');
save(strcat(fullFilepath,'.mat'),'ampsRS','ampsIB','probaOffRS','probaOffIB')
end
% defaultParams; % call first to set parameters not set below
%
% saveOutput=true;
%
% numSims=10; % per amplitude value
%
% amps=[0.01:0.05:1.5];
% numAmps=length(amps);
%
% probaOffRS=zeros(numAmps,1);
% probaOffIB=zeros(numAmps,1);
%
% turnOffBeta=1;
% turnOffPulseLength=120;
%
% turnOffTarget='RS';
%
% for aa=1:numAmps
%
% turnOffAmp=amps(aa)
% numOffs=0;
% turnOffTarget='RS';
% for sim=1:numSims
% sim
% networkSim;
% rastFig=figure(1);
% clf
% hold on
% rastergram;
% hold off
% drawnow;
% turnOffAmp
% numOffs=numOffs+turnedOff(fullV,150,largeDt)
% end
% probaOffRS(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);
% if saveOutput
% saveas(h,fullFilepath,'fig');
% saveas(h,fullFilepath,'png');
% save(strcat(fullFilepath,'.mat'),'amps','probaOff')
% end