Given a positive, integer n, create a function that returns the respective binary number in the form of a vector.
Example:
input: 3 output: [1 1]
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers229
Suggested Problems
-
Number of 1s in the Binary Representation of a Number
486 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
14321 Solvers
-
Test if two numbers have the same digits
267 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
736 Solvers
-
Convert a Cell Array into an Array
2340 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!