Problem 1488. Generate binary combinations for a given number of bit(s)
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.
Solution Stats
Problem Comments
-
5 Comments
Show
2 older comments
andrea84
on 5 May 2013
test case 1 should be [0;1] ?
Ned Gulley
on 6 May 2013
I cleaned up the problem statement and fixed the first test.
Claudio Gelmi
on 7 May 2013
Thanks!
Solution Comments
Show commentsGroup

Paper-&-pencil Games
- 19 Problems
- 4 Finishers
- Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
- Calculate the area of a triangle between three points
- Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
- Television Screen Dimensions
- Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
- Calculate the area of a triangle between three points
- Are all the three given point in the same line?
- Volume of a Parallelepiped
- Spherical radius given four points
- Angle between Two Vectors
- Is the Point in a Circle?
- What is the distance from point P(x,y) to the line Ax + By + C = 0?
- Covering area
- Clock Hand Angle 1
- Angle between two vectors
- Similar Triangles - find the height of the tree
- Circumscribed circles
- Are you in or are you out?
- Clockwise or Counterclockwise
- Smallest distance between a point and a rectangle
- Great Circle Distance
- Right and wrong
Problem Recent Solvers92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!