Appendix A

function [nactive]=miallt1(nunits,pon,poff,nsteps,itsperstep, nruns);

%function [nactive]=miallt1(nunits,pon,poff,nsteps,itsperstep, nruns)

%Implements Miall's population accumulator model of timing, %with a

%poisson distribution of iterations per time step.

%Input parameters are:

% nunits -> the number of neurons in the network % pon -> probability of an off unit turning on per time step % poff -> prob. of an on unit turning off per iteration of model % nsteps -> number of time steps processed per run % itsperstep -> mean number of model iteration per time step % nruns -> number of repetitions of whole model

%Output parameters are:

% nactive -> matrix containing nruns columns, and nsteps rows % each row is the number of units active at one time step.

%Modification history:

% BCR 12/01/98 - created first version % BCR 4/1/02 - reformatted for publication nactive=zeros(nsteps,nruns); steps=poissondev(itsperstep,nsteps*nruns); steps=reshape(steps,nsteps,nruns); for j=1:nruns units=zeros(nunits,1); for i=1:nsteps ponmat=rand(size(ponmat))<=pon; units=units|ponmat;

poffmat=rand(length(find(units==1)),steps(i,j))<=poff; units(find(units==1))=units(find(units==1))-(sum(poffmat')>0)';

nactive(i,j)=sum(units);

0 0

Post a comment