Binary - MATLAB Cody - MATLAB Central

Problem 1861. Binary

Difficulty:Rate

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

55.85% Correct | 44.15% Incorrect
Last Solution submitted on Apr 28, 2025

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
1
2

Problem Recent Solvers211

Suggested Problems

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!