how to generate 2^16 different combinations of a vector containing 0 and 1 only?
Show older comments
Hello all,
I would like to generate 2^16 different combinations of 16 bits containing 0s and 1s. I have tried different ways like using nchoosek,... but I have the out of memory error. Could somebody please propose a more efficient way? Thank you!
1 Comment
James Tursa
on 9 Dec 2015
Please explain the problem you are working and why you think you need this matrix in memory all at once.
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!