No BSD License  

Highlights from
NESim

image thumbnail
from NESim by Chris Eliasmith
General package for large-scale biologically plausible simulations (with GUI).

genWeights
function genWeights
%% Create connections weights for Connections(m,n).form = 2;

%% Feb. 25, 2001 Consolidation

%% Feb. 9, 2001
%% Copyright (C) by Charles. H. Anderson (All Rights Reserved)
%% Dept. Anatomy and Neurobiology
%% Washington Univ. School of Medicine
%% St. Louis, MO
%% cha@shifter.wustl.edu

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% Basic Time Parameters
global T dt time; % T total length of simulation; dt step size; vector of time steps   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% Global System Variables 
global INPUTS Ensemble Connections SpikeData;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

NumEns = length(Ensemble);

for(m=1:NumEns);
    for(n=1:NumEns)
        if(Connections(m,n).form==2)
            if(Connections(m,n).inputMode==1)
                Connections(m,n).weights{1} = (Ensemble(m).soma{1}.gain*ones(1,Ensemble(n).N)).*...
                    (Ensemble(m).encvec{1}*Connections(m,n).matrix{1}*Ensemble(n).decvec{1}');
            elseif(Connections(m,n).inputMode==2)
                Connections(m,n).weights{1} = (Ensemble(m).soma{1}.gain*ones(1,Ensemble(n).N)).*...
                    (Ensemble(m).encvec{1}*Connections(m,n).matrix{1}*Ensemble(n).decfun{1}');
            else
                msg = sprintf('Ignoring coupling weight, no connection %d to %d \n',m,n);
                warning(msg);
            end
        end
    end
end

Contact us at files@mathworks.com