This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/projects/project_noiseficurves/solution/noiseficurves.m

41 lines
755 B
Matlab

%% general settings for the model neuron:
trials = 10;
tmax = 50.0;
%% f-I curves:
figure()
Ds = [0, 0.001, 0.01, 0.1];
for j = 1:length(Ds)
D = Ds(j);
currents = 0.0:0.5:20.0;
rates = ficurve(trials, currents, tmax, D);
plot(currents, rates);
hold on;
end
hold off;
%% spike raster and CVs
figure()
current = 12.0;
for j = 1:length(Ds)
D = Ds(j);
spikes = lifspikes(trials, current, tmax, D);
subplot(4, 2, 2*j-1);
spikeraster(spikes, 0.0, 1.0);
subplot(4, 2, 2*j);
isih(spikes, [0:0.001:0.04]);
end
%% subthreshold resonance:
time = [0.0:0.0001:1.0];
current = 5.0 + 4.0*sin(2.0*pi*5.0*time);
D = 0.1;
spikes = lifspikes(trials, current, tmax, D);
subplot(2, 1, 1);
spikeraster(spikes, 0.0, 1.0);
subplot(2, 1, 2);
plot(time, current);