fixed initial condition of IF models

This commit is contained in:
2017-02-01 15:32:05 +01:00
parent 768d5bb7e6
commit 24bcd70864
11 changed files with 24 additions and 19 deletions

View File

@@ -76,7 +76,8 @@ plot(false2s, true1s);
T = 0.1;
gains = 0.01:0.01:1.0;
cmax = 100;
ds = zeros(length(gains), 1);
dstt = zeros(length(gains), 1);
dsff = zeros(length(gains), 1);
for k = 1:length(gains)
gain = gains(k);
spikes1 = lifboltzmannspikes(trials, I1, tmax, gain);
@@ -84,9 +85,11 @@ for k = 1:length(gains)
[c1, b1] = counthist(spikes1, 0.0, tmax, T, cmax);
[c2, b2] = counthist(spikes2, 0.0, tmax, T, cmax);
[d, thresholds, true1s, false1s, true2s, false2s, pratio] = discriminability(spikes1, spikes2, tmax, T, cmax);
ds(k) = d;
dstt(k) = d;
dsff(k) = min(false1s + false2s);
end
figure()
plot(gains, ds)
plot(gains, dstt);
hold on;
plot(gains, dsff);
hold off;

View File

@@ -20,7 +20,7 @@ function spikes = lifboltzmannspikes(trials, input, tmax, gain)
for k=1:trials
times = [];
j = 1;
v = vreset;
v = vreset + (vthresh - vreset) * rand();
noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt);
for i=1:n
v = v + (- v + noise(i) + inb)*dt/tau;