all posible combinations of 0 and 1

4 次查看(过去 30 天)
HI guys, I just need help getting the 16 different combinations 0 and 1 can take. Ex. 0 0 0 1 0 0 1 0 0 1 0 0 . . . anyone please can help me?

采纳的回答

Walter Roberson
Walter Roberson 2018-11-1
dec2bin(0:15,4)-'0'

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Elementary Math 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by