MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Generate the binary combination as in the example below.

Example: If you are given:

bin_comb(2)

The answer will be:

0 0 0 1 1 0 1 1

The answer will appear in double class.

34 correct solutions
34 incorrect solutions

Last solution submitted on May 30, 2015

1 player likes this solution

2 Comments

Suman Saha
on 11 May 2013

best among the best

Pavan Toraty
on 24 Oct 2013

Can we not use de2bi function?

5 Comments