Dear all,

I want to generate all combinations of 0 1 in Matlab.

For example,

a=[0 0 0];

b=[1 1 1];

and I need answer as

Ans=

[0 0 0

0 0 1

0 10

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1]

Thank you

More Ghanshyam G. Tejani's questions See All
Similar questions and discussions