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

Learn moreOpportunities for recent engineering grads.

Apply TodayGenerate 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.

31 correct solutions
33 incorrect solutions

Last solution submitted on Jan 23, 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