MATLAB Answers

8bit binary sub string to unsigned integer in matlab

조회 수: 1(최근 30일)
Jimmy cho
Jimmy cho 8 Aug 2020
답변: James Tursa 8 Aug 2020
Hi guys, Im trying to implement a function that its input is 8bit substring and output is a unsigned integer number of the given 8bit substring, in other words I want to
implement a function that give it binary substring byte (8bit binary number substring - its type is string) and output is an unsigned integer that this substring valued !
for example: lets assume I have this input: substring='00000001' => output=1 in unsigned integer (unsigned decimal) , I mean by unsigned .. there's no negative ..
could anyone help me how can I implement that in matlab?
lets assume that the function is called conversion(input1) , and input1 is the given binary substring as I showed in my example above.

  댓글 수: 0

댓글을 달려면 로그인하십시오.

답변(1개)

James Tursa
James Tursa 8 Aug 2020
doc bin2dec

  댓글 수: 0

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by