📄 ltsum.m
字号:
function output = LTsum(numneurons, icurrent, R, Tmin, Tmax)
% function output = LTsum(numneurons, icurrent, R, Tmin, Tmax)
%
% This function simulates multiplication by linear summation of the output
% of a population of Linear Threshold neurons. All neurons receive the
% same input current. Their output is zero while the current value is
% below that neuron's threshold, and above threshold:
% output = R * (current - Ithreshold)
% The thresholds of the neurons are uniformly distributed between Tmin and Tmax
%
% numneurons = number of neurons to simulate
% icurrent = vector of current values to use
% R = constant of proportionality used to calculate the output of
% above-threshold neurons.
% Tmin = minimum voltage threshold
% Tmax = maximum voltage threshold
% uniformly distributed current thresholds
Its = Tmin + rand(1,numneurons)*(Tmax-Tmin);
clear output
for i=1:length(icurrent)
whosfiring = icurrent(i) > Its;
output(i) = sum(whosfiring.*R.*(icurrent(i) - Its));
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -