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 Center および File ExchangeDownloads についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by