Matlab - binary vector with high concentration of 1s (or 0s)

Posted by JohnIdol on Stack Overflow See other posts from Stack Overflow or by JohnIdol
Published on 2010-03-30T23:11:17Z Indexed on 2010/03/30 23:13 UTC
Read the original article Hit count: 531

What's the best way to generate a number X of random binary vectors of size N with concentration of 1s (or, simmetrically, of 0s) that spans from very low to very high?

Using randint or unidrnd (as in this question) will generate binary vectors with uniform distributions, which is not what I need in this case.

Any help appreciated!

© Stack Overflow or respective owner

Related posts about matlab

Related posts about random