% Create N Poisson spike trains for which a proportion c of the % spikes are synchronous. % The spike trains are of time length T with bin size dt. % r is the rate. % The output is returned as a Nx(T/dt) binary matrix. % P=sip(r,c,N,T,dt) function P=sip(r,c,N,T,dt) % Initialize the output P=zeros(N,T/dt); % Generate a mother process % This process contains all of the synchronous spikes mother=Poisson(r*c,T,dt); % Generate the N daughter processes % Add the asynchronous spikes to each train. for i=1:N P(i,:)=mother+Poisson(r*(1-c),T,dt); end