No BSD License  

Highlights from
Sampling from multivariate correlated binary and poisson random variables

from Sampling from multivariate correlated binary and poisson random variables by Philipp Berens
These Matlab functions can be used to generate multivariate correlated binary variables, and correl

binHist(S)
function hc = binHist(S)
% hc = binHist(S)
%   Generates histogram for binary vectors in S
%   S = D * N matrix
%
% Code from the paper: 'Generating spike-trains with specified
% correlations', Macke et al., submitted to Neural Computation
%
% www.kyb.mpg.de/bethgegroup/code/efficientsampling


D = size(S,1);
C = binBinaryToDec(S);
hc = countElem(C,0,2^D);

Contact us at files@mathworks.com