Relation between functions "dec2bin" & "dec2binvec" - MATLAB Cody - MATLAB Central

Problem 44232. Relation between functions "dec2bin" & "dec2binvec"

Difficulty:Rate

Here it's an easy problem we try to find the relation between the two functions "dec2bin" & "dec2binvec", so here you must write a function using "dec2bin" to find the result of "dec2binvec".

Nb:

DEC2BINVEC Convert decimal number to a binary vector.

    DEC2BINVEC(D) returns the binary representation of D as a binary
    vector.  The least significant bit is represented by the first 
    column.  D must be a non-negative integer. 
    DEC2BINVEC(D,N) produces a binary representation with at least
    N bits.
    Example:
       dec2binvec(23) returns [1 1 1 0 1]

Solution Stats

64.06% Correct | 35.94% Incorrect
Last Solution submitted on Jan 25, 2025

Problem Comments

Solution Comments

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

Problem Recent Solvers37

Suggested Problems

More from this Author14

Community Treasure Hunt

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

Start Hunting!