Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: all possible combinations for n bits in a m bit word

$
0
0
> Like this?
>
> v2=(dec2bin(0:(2^4)-1)=='1')
> u2=v2(sum(v2')'==2,:)

In a better single command,

de2bi(0:2^b.modScheme-1)

Viewing all articles
Browse latest Browse all 19628

Trending Articles