diff options
author | Jan Huwald <jh@sotun.de> | 2012-05-07 19:53:27 (GMT) |
---|---|---|
committer | Jan Huwald <jh@sotun.de> | 2012-05-07 19:53:27 (GMT) |
commit | 00b209240138660db1ded3ef3870023964ce6e4e (patch) | |
tree | 8ffaec780b060bdc478929aa714b8af2ee760671 /code/matlab/random_spikes.m |
Diffstat (limited to 'code/matlab/random_spikes.m')
-rw-r--r-- | code/matlab/random_spikes.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/code/matlab/random_spikes.m b/code/matlab/random_spikes.m new file mode 100644 index 0000000..89baf02 --- /dev/null +++ b/code/matlab/random_spikes.m @@ -0,0 +1,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 |