How to convert 192 bit string to integer in matlab?

조회 수: 3 (최근 30일)
jalashree trivedi
jalashree trivedi 2018년 5월 26일
답변: Ameer Hamza 2018년 5월 26일
I have a 192 bit binary string stored in a variable as bvar=01001101010000010101000001010000010010010100111001000111001000000100000101001110010001000010000001010010010001010101011001000101010100100101001101000101001000000100110101000001010100000000
i want it to convert into an integer as : 1894290318373708250692331360974342813437992324945519136768
how is it possible in matlab? pls help. thank you.

채택된 답변

Ameer Hamza
Ameer Hamza 2018년 5월 26일
See bin2vpi(). Download this package, place it on MATLAB path and then try
bvar='01001101010000010101000001010000010010010100111001000111001000000100000101001110010001000010000001010010010001010101011001000101010100100101001101000101001000000100110101000001010100000000'
decValue = bin2vpi(binaryNumber)
decValue =
118393144898356765668270710060896425839874520309094946048

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by