summaryrefslogtreecommitdiff
path: root/code/matlab/random_spikes.m
blob: 89baf02273a7d96958a82f7355b5ed7f852f5628 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
% fill the extenrally
%num_neurons = 2; % wich should receive a spike
%spike_freq = 1; % local per neuron per second
%duration = 2; % [s]

current = 100; % this should drive my neurons crazy

format long

num = num_neurons * spike_freq * duration;
res = [ sort(rand(num, 1) .* duration), floor(rand(num, 1) .* num_neurons), ones(num, 1) * current ];

for i=1:length(res),
    fprintf(2,'%f,%d,%f\n', res(i,1), int32(floor(res(i,2))), res(i,3))
end
contact: Jan Huwald // Impressum